Component 6: Gallery Hub
This component loads a list of galleries without actually rendering any galleries. Use this if you wish to show a "hub" page with a link to all of your galleries.
For a good introduction to this component, please first check out the Demo Site.
[Component Inspector Options]
The following are available in the gallery inspector:
Leave blank to show a hub of all galleries, or select one of the options to only show certain galleries.
Possible values are:
Note: Gallery Slug, Gallery Description, and Published On only work for images uploaded using the Galleries page!
||Max Galleries||The maximum number of galleries to display (leave blank to show all)|
||Link URL||Set the URL of your galleries. Include the following placeholder, which will be replaced with the "slug" of your gallery: %slug%'|
||Open in new tab?||Should the link open in a new tab or in the current one?|
Choose one of the presets, or "template" if you wish to define your own template, or "custom" if you will write your own Twig code to render the gallery links! Possible values are:
||Link Template||Choose "Set the Template Below" in "Display as" and set your template, tags such as %type%, %url%, %slug%, %folder%, %name%, %description%, %keywords%, %created_at%, %updated_at%, %preview_image_url% will be replaced with actual values.|
also see API Docs, Illuminate\Database\Eloquent\Collection and Illuminate\Support\Collection
Collection of matching galleries. Each item in the collection is an instance of the Gallery class (see above). For an explanation of the Gallery and GalleryItem class properties, see Page Properties.
Type: array of strings
This is the result of the File::directories() call that retrieves all subdirectories underneath your gallery root folder. Only populated when the "Hub Type" is set to "All Galleries".
As set by the user in the component inspector, will be [ALL] if the user selected "All Galleries", or a keyword (which is used to limit the galleries shown)
If the hub type is set to search by keywords, then this will be set to the selected keyword.
As set in the component inspector, can be one of:
As set in the component inspector, can be either "ASC" or "DESC"
Maximum number of galleries to show, as set in the component inspector
As set in the component inspector
How the galleries should be rendered, can be one of:
default (unordered list of preview images),
titleOnly (unordered list of gallery names),
template (use a custom template),
custom (no code is generated)
If "visualization" is set to "template", then the gallery items will be rendered using the template given here. The following placeholders are replaced with actual values:
|%type%||Gallery type, can be NOVEMBER_GALLERY, OCTOBER_MEDIA_MANAGER_FOLDER, or BLOG_POST|
|%name%||Gallery name (or the folder name in case of galleries uploaded using the OctoberCMS media manager|
|%created_at%||Gallery creation date*|
|%updated_at%||Gallery last update date*|
|%preview_image_url%||Preview image URL (if set)*|
|%published%||Gallery is published or not*|
|%preview_image_title%||Preview image title*|
|%preview_image_description%||Preview image description*|
|%preview_image_width%||Preview image width*|
|%preview_image_height%||Preview image height*|
|%preview_image_filename%||Preview image filename*|
|%preview_image_filesize%||Preview image file size*|
|%items_count%||Count of images|