Image-gallery administration and frontend components for DravenCMS. Galleries use the File package for stored media and the Tag package for classification.
- Gallery and picture administration.
- Upload from managed file structures.
- Picture ordering, captions, activation, and tags.
- Overview and detail frontend components for CMS pages.
- Commands for historical link migration and gallery retention cleanup.
- Provider-defined admin navigation and ACL permissions.
composer require dravencms/galleryThe package loader registers the extension, admin presenter, services, and Doctrine mappings. Apply the package schema through the application's migration workflow before using the gallery. Navigation and permission definitions come from providers; assign permissions through the group editor.
With dravencms/structure installed, the package exposes Gallery Overview and Gallery Detail component factories to the CMS. Their ICmsActionOption configuration selects the content rendered by each placement.
Application code can also inject OverviewFactory or DetailFactory directly when it already has the corresponding CMS action option.
Keep only a defined number of newest galleries:
php bin/console gallery:gallery:clean 20Migrate historical direct picture-file relationships to StructureFileLink records:
php bin/console gallery:gallery:migrate-linkBoth commands modify persisted gallery/file relationships. Back up the database and file data before using them on existing installations.
This package is licensed under the LGPL-3.0-only license.
The gallery creates its root gallery file structure when the first picture upload needs it and reuses it on later uploads. No fixture or setup command is needed. Existing file structures and files are retained; a structure named gallery below another parent does not replace the gallery root.
Administration uses User 3.1, Admin 3.2 and Application 0.3 guards. Screens and write callbacks enforce the existing provider-defined permissions server-side, including direct URLs and bulk callbacks. Mutating signals require POST and a session-bound action token; synchronize the matching admin assets when upgrading. See the User package's user:security:migrate instructions for the password-reset schema change.
This release requires Dravencms File 3 / Nette Files 3. Image URLs include a specific file resolver and attachment reference; templates no longer pass bare files. Published attachments are public-cacheable; admin previews of unpublished content require the plugin's edit permission and are private. Original files and generated images stay outside the document root. Install the private-storage configuration and run File's checksum/storage migrations before serving this release. See the File package README.
This package declares its own variants in dravencms.config.neon; Nette merges the
files.variants maps. Definitions use named width, height and resizeMode fields.
resizeMode defaults to fit; an omitted/null dimension is unconstrained, and at
least one dimension is required. On upgrade, replace old positional definitions
and remove variants owned by other packages from the File configuration. Project
variants belong in project configuration. Update the matching File, Nette Files
and installed Gallery/Article/Partner/Carousel releases together. No additional
database or storage migration is needed for this configuration change.