6.15 Gallery
The Gallery Template exists as a HTML template. The Gallery template allows you to display a series of pictures which are already imported and created in the system as Picture Content Items.
In order to create a Gallery, you can create a template called HTML-gallery.tpl.php and enable a parameter which references a part of the title of your series of images.
To include the Gallery Functionality in a Template, you should use the following snippet:
<?php include "templateincludes/gallery.inc.php";?>
Once you have registered this template with your system, you can proceed to create a Gallery Content Item:
- We will create the Gallery first. Create a new menu item (or use the backend Content Folders screen).
- Select to use the HTML content type. Create a content item with the HTML-gallery.tpl.php template.
- Click on the Template Details icon in the toolbar. Edit the Template Details and look for a "search_param" parameter (Skip to Step 4 if this parameter exists). If it does not exist, we need to create it.
- To create a parameter, go to the Admin Control Panel, select Templates, and edit the settings for the Gallery template.
- To insert a parameter, click Edit and then Add Parameter. You must call the parameter "search_param". Save the new details.
- On the Content Item's Template Details, enter a parameter value that contains the keyword within your series of image titles.
- The gallery will now display all images that have the parameter value in the item's title.
- To upload a picture that will be visible in the gallery, create a new menu item (or use the backend Content Folders screen) to create a Picture Content Item and ensure the title contains the parameter value.
Top of Page