getting each gallery dir threw a foreach - Gallery Module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
Rednes
Forum Members
Forum Members
Posts: 85
Joined: Wed Apr 08, 2009 1:09 pm

getting each gallery dir threw a foreach - Gallery Module

Post 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.
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am

Re: getting each gallery dir threw a foreach - Gallery Module

Post by nicmare »

i am confused.
when you use
{Gallery dir='parentdir'}
then you see all galleries which are in that dir
User avatar
Rednes
Forum Members
Forum Members
Posts: 85
Joined: Wed Apr 08, 2009 1:09 pm

Re: getting each gallery dir threw a foreach - Gallery Module

Post 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).
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm

Re: getting each gallery dir threw a foreach - Gallery Module

Post by Jos »

Maybe you could do something with the action="gallerytree" parameter?
User avatar
Rednes
Forum Members
Forum Members
Posts: 85
Joined: Wed Apr 08, 2009 1:09 pm

Re: getting each gallery dir threw a foreach - Gallery Module

Post 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!
Post Reply

Return to “Modules/Add-Ons”