Skip to content
  1. Extras
  2. miniShop2
  3. Snippets
  4. msGallery

msGallery

Snippet for goods gallery display.

Parameters

ParameterBy defaultDescription
tpltpl.msGalleryFormatting chunk
productProduct identifier. If not indicated, current document id is used.
limitSample results limit
offsetSkip results from the beginning of the sample
sortbyrankSample sorting
sortdirASCSorting direction
toPlaceholderIf not empty, snippet will store all data in placeholder with this name, instead of displaying.
whereThe line, coded in JSON, containing additional sample conditions.
filetypeFile type for sampling. "image" may be used for picture indication and other files extension. For example: "image,pdf,xls,doc".
showLogTo show additional information of snippet operation. For authorized in "mgr" context only.

Tip

Another pdoTools general parameters may be used.

Formatting

The snippet counts on the work with chunk Fenom and transfers there only one variable$files with file array.

You may see all available gallery placeholders simply indicating the empty chunk:

modx
<pre>[[!msGallery?tpl=``]]</pre>

For gallery design Fotoramais used. You may indicate your parameters directly in the chunk , according to instruction.

The presence of the chunk.fotorama element in #msGallery is verified when initializing scripts. The Fotorama scripts and styles will be loaded if only this element is present and contains files.

So if you need not Fotorama at all, simply exclude .fotorama from the chunk.