Hi
Is it possible to change the gallery directory from a variable.
I have a variable called $selection which holds the names of sub-directory's I would like the page to change if any of these are selected.
Within the template I have {gallery dir="images"} how can the variable be added so that the directory is changed.
Thanks
Gallery Dir
Re: Gallery Dir
I'm not sure what values the dir parameter accepts but assuming that $selection holds a valid value for that parameter you could use {gallery dir=$selection}.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Gallery Dir
Hi
Thanks for the info that works just fine.
But could I take it one stage further by also adding a image-field-definition so we could pick out a single image or any image with the field set to say 'Artist'.
Thanks
Thanks for the info that works just fine.
But could I take it one stage further by also adding a image-field-definition so we could pick out a single image or any image with the field set to say 'Artist'.
Thanks
Re: Gallery Dir
Not sure what you mean. You may want to tell exactly what you want to accomplish if possible with an example. Probably someone already did it before.
Re: Gallery Dir
Hi
Sorry if I didn't make myself clear.
Now that I am selecting the correct dir from the $selection which shows all the images, I would now like to be able to select from that list just one image or if possible a group. I was trying to use an image-field-definition, but I was unsure how the field could be added to the already dir=$selection.
I can easily put the field into a variable so I was trying something like this" dir=$selection and $group" but unsure what the right syntax was for 'and' or if it was even possible.
Maybe there is another way.
The idea being you would select from two list one for the gallery dir and another to select which group of images to show from that list.
I would have thought this was possible in someway.
Regards
Sorry if I didn't make myself clear.
Now that I am selecting the correct dir from the $selection which shows all the images, I would now like to be able to select from that list just one image or if possible a group. I was trying to use an image-field-definition, but I was unsure how the field could be added to the already dir=$selection.
I can easily put the field into a variable so I was trying something like this" dir=$selection and $group" but unsure what the right syntax was for 'and' or if it was even possible.
Maybe there is another way.
The idea being you would select from two list one for the gallery dir and another to select which group of images to show from that list.
I would have thought this was possible in someway.
Regards
Re: Gallery Dir
Would it be possible using a category hierarchy?
cat I
sub cat 1.1
sub cat 1.2
...
cat II
sub cat 2.1
sub cat 2.2
...
...
Done that before, but was a not very simple. Using ajax for dynamic loading of images.
cat I
sub cat 1.1
sub cat 1.2
...
cat II
sub cat 2.1
sub cat 2.2
...
...
Done that before, but was a not very simple. Using ajax for dynamic loading of images.
Re: Gallery Dir
Hi Velden
Yes I think that would be possible, I have already tried something similar, but I find it means duplicating or triplicating the images.
On a large list it adds enormously to file size on the server.
I was hoping just to have all the images in one folder and then select the require ones.
Cheers
Yes I think that would be possible, I have already tried something similar, but I find it means duplicating or triplicating the images.
On a large list it adds enormously to file size on the server.
I was hoping just to have all the images in one folder and then select the require ones.
Cheers
Re: Gallery Dir
So what would be the content of the extra image field definition? Could you give an example?
One image can be member of multiple groups?
One image can be member of multiple groups?
Re: Gallery Dir
Hi again
I was thinking along the lines of a dropdown which could contain something like group1,group2,group3 etc. Or even just letters, A,B,C,D, and so on.
These could then be attached to the relevant images, and then using that field to identify them in the gallery directory list.
Any ideas.
I was thinking along the lines of a dropdown which could contain something like group1,group2,group3 etc. Or even just letters, A,B,C,D, and so on.
These could then be attached to the relevant images, and then using that field to identify them in the gallery directory list.
Any ideas.


