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

ms2GalleryResources ​

Snippet for outputting resources via pdoResources with the first image from each resource's gallery joined.

Parameters ​

All pdoResources parameters are supported, plus:

ParameterDefaultDescription
typeOfJoinleftHow to join gallery images. left — Left Join: resources are included even without images. inner — Inner Join: only resources that have images.
includeThumbssmallComma-separated list of thumbnail sizes. Example: small, medium.
includeOriginalAdd a join with the original image URL. Available on the resource as alias.original, e.g. small.original.

Examples ​

Output all resources; first gallery file is joined where available:

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

Output only resources that have galleries:

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