-
☆ A M B ☆
- 147 Posts
I'd like to know this as well - since I am also working on something very similiar to this.. Right now when I select a Gallery and choose the parent Gallery it shows all Gallery even if it is a different parent.
Billy Koch
Follow me on Twitter:
@DefKoch
Skype: billyk0ch
-
☆ A M B ☆
- 3,141 Posts
Something like this should do the trick:
<ul>
[[GalleryAlbums? &parent=`0` &showAll=`0` &rowTpl=`gallery-parent-tpl`]]
</ul>
Then in the gallery-parent-tpl chunk call galleryAlbums again, something along these lines should suit your need:
<li>
<a>[[+name]]</a>
<ul>
[[GalleryAlbums? &parent=`[[+id]]` &showAll=`0` &rowTpl=`gallery-sub-tpl`]]
</ul>
</li>
where gallery-sub-tpl is just a list like the chunk you posted:
<li[[+cls:notempty=``]]>
<a href="[[~[[*id]]? &[[+albumRequestVar]]=`[[+id]]`]]">
[[+name]]</li>
Mark, this seems to work well.
A bit of tweaking, but otherwise, great.
10x
-
☆ A M B ☆
- 3,141 Posts
If there was anything wrong in the code I posted (didn't actually test it), I'd appreciate if you could point it out so we can help others who find this thread months from now as well
Billy;
did you ever solve that parent thing - I am having the same problem &parent=`whatever` is selecting all galleries no matter what I do... [modx 2.2]
[[!GalleryAlbums? &parent=`5` &showall=`0` &prominentOnly=`0` &sort=`rank` &dir=`asc`]]
UPDATE:
never mind... &showall should be &showAll
[ed. note: sean69 last edited this post 14 years, 7 months ago.]
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525