Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
..in upload dir for a template with dynamic folders and a gallery.

So, basically, I have a big gallery with categories (dynamic folders).

I am to assign a special image for a folder, so I use the "choose from server" button. And what I get is a ton of images in 1 folder, which, of course, has the same name as my template.

Is it possible to tune the gallery template, so to auto-create a subfolder in 'upload/images' to reflect the dynamic folders, created by user? In such a case, I (or client) would be able to see uploaded pictures in their corresponding subfolders, and choose easily the picture.

Is there a way to programmatically achieve this effect when designing templates? Or is it to be requested as a feature?
Thank you!
so to auto-create a subfolder in 'upload/images' to reflect the dynamic folders, created by user?

This, incidentally, was how I had originally planned the gallery.

Creating physical folders matching the virtual Couch folder being created was not a big deal. However, what was not so straight-forward is when the user decides to -
a. delete a virtual folder
b. move a virtual folder from under one parent to another
c. rename a virtual folder
d. move cloned-pages (i.e. gallery items) from one folder to another.
etc.
All the things mentioned above would need keeping track of all these events and then making the synchronizing changes to the physical setup. It is doable now (with 'events' module that was not available when the gallery was introduced) but still will be quite some work.

I'll put it in the 'todo' list for the time-being :)
True. That's why planning is done before coding :) Many issues arise while structuring things.
Aside question: KK, what if we could define multiple upload folders in config?

As to auto-folders. Maybe not make them 'auto':
In a template, for example, an editable could be configured with the folder-name.
Code: Select all
<cms:editable name='physical_folder' type='text/path' >/upload folder/target folder</cms:editable>

OR a button in admin, beside Select all|Delete all / Assign a real folder on server.

Anyway, I'll check the events module. Thank you! :)
3 posts Page 1 of 1
cron