Can I use custom folder names for galleries?

I would like to use custom folder names for galleries (non-numeric). Is it possible?

Hi @liho, sorry for the slow response, but yes you can. Just disable the moregallery.resource_id_in_path setting and when editing a gallery resource go to the Settings tab to specify its own directory.

Hi @mhamstra
Can I use custom folder name as ID+Alias or ID+text, instead of ID ?
Also, when I use Import button, images are copied to the resource folder. Can I prevent it and put only image link to database instead of link to the new image?
Thank you

When you disable the moregallery.resource_id_in_path system setting, you can set the gallery folder on the Settings tab on the resource edit panel. That doesn’t work the same as path placeholders (like Redactor), but can be used to set custom paths to anything you’d like.

It’s probably possible to write a 5 line plugin that automatically sets it to the resource alias… would just need to set the appropriate property value for new resources.

Not currently; it works like that to make sure all images are processed and available in the same way.

If someone else needs a solution for this. Create a Plugin “setGalleryPath” with the following Plugin-Code.

Set the System-Event to “OnDocFormSave”.

Also set the System-Setting “moregallery.resource_id_in_path” to false.

2 Likes