Skip to content
  1. Extras
  2. ms2Gallery
  3. Snippets
  4. ms2GalleryResources

ms2GalleryResources

Snippet for the results output through pdoResources with an attachment of the first picture from the resource's gallery.

Parameters

All parameters pdoResources are acceptable, plus there are some unique ones:

ParameterBy defaultDescription
typeOfJoinleftType of adding pictures from a resource. Left stands for Left Join, which means that resources will be selected even if they do not host any pictures. And inner stands for Inner Join, which will select only resources with pictures.
includeThumbssmallList of previews generated with commas. For example, "small,medium".
includeOriginalAdding an extra join to the selection with a link to the original picture. It will be available in the resource's array as "pseudonym.original", for example, "small.original".

Examples

Output of all resources. For those resources that have galleries the first file will be attached.

modx
[[!ms2GalleryResources?
  &parents=`0`
  &typeOfJoin=`left`
]]

Output of resources with galleries only

modx
[[!ms2GalleryResources?
  &parents=`0`
  &typeOfJoin=`inner`
]]