Page 1 of 1
getting each gallery dir threw a foreach - Gallery Module
Posted: Fri Dec 10, 2010 12:49 pm
by Rednes
G'day,
I would like to retrieve each gallery category from the gallery module.
currently im doing this in a HTML block:
Code: Select all
<div id="preloadimages">
{Gallery dir='parentdir/subdir1'}
{Gallery dir='parentdir/subdir2'}
</div>
But im looking for a dynamic solution threw a foreach, which should look something like this:
Code: Select all
<div id="preloadimages">
{foreach from=$galleries item=gallery}
{Gallery dir='$gallery->parentdir/$gallery->subdir'}
{/foreach}
</div>
Anyone know how to achieve this?
Thanks!
Red.
Re: getting each gallery dir threw a foreach - Gallery Module
Posted: Fri Dec 10, 2010 12:51 pm
by nicmare
i am confused.
when you use
{Gallery dir='parentdir'}
then you see all galleries which are in that dir
Re: getting each gallery dir threw a foreach - Gallery Module
Posted: Fri Dec 10, 2010 1:27 pm
by Rednes
Thanks for your reply.
That won't work for me in this situation. Because I want to load all the images from all subcategories at once and only show the first image of a subcategory. This way I dont need to POST to another page which is kind of critical for this site.
You could have a look here:
http://tiny.cc/jaf6u
go to the page "Amenities & Pictures" and click on the button "Check Pictures".
On the left side you'll see the first picture of each gallery. When clicking on one of those you can see the other pictures from that gallery by clicking next (arrow pointing to the right).
Re: getting each gallery dir threw a foreach - Gallery Module
Posted: Fri Dec 10, 2010 1:42 pm
by Jos
Maybe you could do something with the action="gallerytree" parameter?
Re: getting each gallery dir threw a foreach - Gallery Module
Posted: Sun Dec 12, 2010 10:34 am
by Rednes
Okay, so I can loop all the subgalleries I want now, just called the gallery module with the parent dir and attached a custom template.
But what I actually need are the directory names of each subgallery. Are they available in the templates? Or should I make a UDT to collect them?
thx!