Blog Sections Open

Extending SimpleGallery with Upload, Save, Delete, and Refresh Hooks

How to build real automation around SimpleGallery events instead of treating uploads as passive files.

SimpleGallery becomes much more powerful once you stop treating it as “just an image upload field” and start using its event hooks as workflow triggers.

The original example highlighted four useful lifecycle events:

  • OnFileBrowserUpload for reacting immediately after a file lands on disk;
  • OnSimpleGallerySave for enriching saved metadata;
  • OnSimpleGalleryDelete for cleaning up derivative files;
  • OnSimpleGalleryRefresh for regenerating thumbnails and synced output.

That allowed the project to create small preview images automatically, store SEO-friendly titles, and remove generated thumbnails when the source image was deleted. The same pattern can support watermarking, naming conventions, derivative formats, or gallery-side metadata hygiene.

This is a strong Evolution CMS technique because it turns a gallery from a passive content field into an event-driven media pipeline.

Newer post

Using AjaxSnippet with pdoResources in Evolution CMS Workflows

What to watch for when AjaxSnippet is used to refresh pdoResources output and the trigger parameter starts interfering with the request flow.

Older post

Keeping Active States Correct in Wayfinder Menus with Dropdowns

How to keep top-level and submenu active states consistent in a Wayfinder menu with nested dropdown markup.