I have been building a site for a photographer with many galleries and thousands of images.
It would be very nice if, when the gallery items are uploaded, they are placed in subdirectories based upon the name of the gallery. This would allow users to better deal with the files stored in the gallery.
So, in the default configuration, we might have....
sites/default/files/node_gallery/gallery1/[files]
sites/default/files/node_gallery/gallery2/[files]
etc.
Looking at the code this seems possible, but I haven't been able to get it to work so far.
Comments
Comment #1
zengenuity commentedThis should be possible with the Filefield Paths module. You can set the directory paths of the gallery item files, using the node_gallery_ref field tokens for adding the gallery node ID or title to the path.
Comment #2
jaylotta commentedBrilliant! Worked like a dream and you are a lifesaver.
One other thing....
Can I somehow make node gallery delete all of the images when a gallery is deleted?
Comment #3
zengenuity commentedThat's not built in, but it could possibly be done with the Rules module, I think, by creating a rule on gallery node deletion.
Comment #4
jaylotta commentedI used the Filefield Paths module, changed the paths of some existing galleries and retroactively updated the files to the new directories.
After that all of the Node Gallery display settings and some of the File display settings where messed up.
For instance, in Gallery Item > Manage Display, the Gallery Media field's format was no longer Rendered File but Generic File and the View Modes were all reset to default.