Blog Sections Open

smg: A Tiny Folder-Based Gallery Snippet for Evolution CMS

For quick galleries and lightweight sliders, a folder-driven snippet can be faster to ship than a TV-heavy image management setup.

The smg donor snippet solved a very practical problem: sometimes a page needs a gallery generated from one folder of images, and using a large set of TVs or a heavier gallery component is unnecessary.

What the Snippet Does

  • Scans a target folder.
  • Builds a list of images automatically.
  • Supports limits, descriptions, wrappers, and slider output.
  • Can link items either to local resources or external URLs.

Core Usage Example

[[smg?
    &dir=`images/`
    &show=`6`
    &description=`image1;image2;image3`
    &class=`images`
    &size=`200xauto`
    &slider=`1`
]]

Why It Is Still Useful

For landing pages, temporary promos, small showcases, or imported image folders, a folder-based gallery is much faster to maintain than creating one field per image.

The tradeoff is editorial control. Once the gallery needs per-image metadata, sorting, moderation, or content ownership rules, it is time to move to a more structured approach.

Newer post

File-Based Theme Switching and Templating in MODX Evo

A practical way to separate presentation from database templates by loading theme files from the filesystem in Evolution CMS.

Older post

Using Snippets Safely Inside eForm Templates

Understand when snippets inside eForm templates are parsed and how to avoid parser errors in older Evolution CMS projects.