Jump to content

Recommended Posts

Posted

Hello all,

what are the naming conventions of the image-folders in assets/files/1234/ ?

Is there a way to customize the serialisation? 

many thanks!

Posted

The naming convention is actually the page ID, so 1234 in your example is the page whose id is 1234.

 

 

  • Like 4
Posted

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!

Posted

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
Posted

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.

Posted
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

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
  • Recently Browsing   0 members

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