I am building a picture gallery with getPage/getResources/Gallery snippets.
The starting point is this post:
https://forums.modx.com/thread/20187/how-to-use-modx-getresources-getpage-for-a-gallery-or-anything-you-want
My menu is structured like this:
Item 1
- Subitem 1
- Subitem 2
- Subitem 3
Item 2
Item 3
Subitems, which contain Gallery albums (straight images, no thumbnails) are actually hidden so do not appear on the menu.
When You click, for instance, on
Item 1, You get a page showing the first image from each Subitem with a clickable description that will get You to the corresponding full album.
Like on a page aggregating news, where You can read an extract from each article/resource, but with images.
Hope it is clear.
So in my
Item 1 resource I got:
[[!getPage@Gallery?
&element=`getResources`
&parents=`5` THE ITEM 1 CONTAINER ID
&limit=`999`
&tpl=`thumb_tpl_imageonly`
&includeContent=`1`
&sortby=`menuindex`
&sortdir=`ASC`
]]
Here is the
thumb_tpl_imageonly chunk:
<div id="block">
<div id="pictures">
<a href="[[~[[+id]]]]"><img class="full-img" src="[[+image_absolute]]" alt="[[+description]]"></a>
</div>
<div id="description"><a href="[[~[[+id]]]]">[[+description]]</a></div>
</div>
And this is an example of Subitem page:
[[!Gallery?
&album=`AlbumOne`
&imageQuality=`100`
&sort=`name`
&thumbTpl=`thumb_tpl_imageonly`
]]
Almost everything works fine.
The only problem I am encountering is that
src="[[+image_absolute]]" Gallery property do not render anything.
<img class="full-img" src="">
Any suggestion?
[ed. note: fredela last edited this post 10 years, 10 months ago.]