After intensive (re)search I have found following solution for custom upload folder names. And cause that module has not been updated for a while, it makes sense to actually change file directly. Just wanted to make sure everybody has a change to benefit from it.
If there are several places you need to set up the gallery (frankmullenger/gallery), first set up one new config entry into gallery/_config/gallery.yaml
UploadFolder:
Folders:
<PAGE TYPE THE GALLERY GOES>: "<NEW FOLDER NAME>*"
<PAGE TYPE THE GALLERY GOES>: "<NEW FOLDER NAME>"
etc.
Folder:
- "<NEW FOLDER NAME>"
where * will have sub folders described later. IF there will not be several places, you can just remove the Folders part till Folder.
If only one place, you can set up the folder name as what ever you like or do not change yaml file at all and all will be default (but in that case you do not need the second part of that tutorial as well).
Change/edit file gallery/code/Gallery.php so, that you would replace/change original updateCMSFields function as follows
And cause for news page I wanted each news to be in separated folder (images) then there will be the sub folder part I mentioned before, contains name from ID and date created.
That should eventually cover all the bases - starting from multiple location, multiple upload folders, ending with single location (if yaml file will not be changed).
Hi,
After intensive (re)search I have found following solution for custom upload folder names. And cause that module has not been updated for a while, it makes sense to actually change file directly. Just wanted to make sure everybody has a change to benefit from it.
where * will have sub folders described later. IF there will not be several places, you can just remove the Folders part till Folder.
If only one place, you can set up the folder name as what ever you like or do not change yaml file at all and all will be default (but in that case you do not need the second part of that tutorial as well).
And cause for news page I wanted each news to be in separated folder (images) then there will be the sub folder part I mentioned before, contains name from ID and date created.
That should eventually cover all the bases - starting from multiple location, multiple upload folders, ending with single location (if yaml file will not be changed).
That's it. Thank you :)