froot Posted June 4, 2020 Share Posted June 4, 2020 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! Link to comment Share on other sites More sharing options...
rick Posted June 4, 2020 Share Posted June 4, 2020 The naming convention is actually the page ID, so 1234 in your example is the page whose id is 1234. 4 Link to comment Share on other sites More sharing options...
froot Posted June 5, 2020 Author Share Posted June 5, 2020 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 More sharing options...
rick Posted June 5, 2020 Share Posted June 5, 2020 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? 1 Link to comment Share on other sites More sharing options...
froot Posted June 5, 2020 Author Share Posted June 5, 2020 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 More sharing options...
kongondo Posted June 5, 2020 Share Posted June 5, 2020 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? 2 Link to comment Share on other sites More sharing options...
froot Posted June 5, 2020 Author Share Posted June 5, 2020 OK thanks, I can live with that ? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now