Jump to content

assets/files/1234/ naming conventions


froot
 Share

Recommended Posts

is it  possible to use subfolders like: assets/files/folder/subfolder/1234/image.jpg?

is it possible to use a custom page ID?
I guess I would need to create a field (e.g. with the name custom_id) for the template and then put something like…

$page->id = $page->custom_id;

thanks for you help!

Link to comment
Share on other sites

I'm not sure I understand your goal here.

When you are coding your template files, Processwire sets $page to the current page. Therefore, the $page->id represents that page. I don't know why you would want to change the id. Or are you referring to a custom URL?

  • Like 1
Link to comment
Share on other sites

changing the ID would make migration and finding files easier. I know that $page->id represents that ID and is set automatically when I create a page. I was just wondering, since I would enter a custom ID when creating a page, if I could overwrite this ID before or right after its creation.

Link to comment
Share on other sites

41 minutes ago, fruid said:

if I could overwrite this ID before or right after its creation.

You'd be setting yourself up for all sorts of complications. You really don't want to go there. 

41 minutes ago, fruid said:

finding files easier.

How so? Manually finding files?

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...