Table of Contents

The TGP page templates are the templates that control the appearance of the pages that TGPX generates which contain the links to your galleries and that your surfers will be viewing. This document will give you an overview of the custom functions and variables available in each of the directory templates.

Editing TGP Page Templates

To edit the TGP page templates access the TGP Pages > Edit Templates function from the control panel menu. This will display a page where you will be able to view and modify your TGP page templates. When you first access the TGP page template editing interface you will see a list of your defined TGP pages. You will need to select one of those pages and then click on the icon to load that template for editing. When you click on the icon the page will reload and you will now see the HTML and template code for this TGP page in a large text input box. There will also be a number of icons displayed across the top of the page, each of which is described below. Search and Replace

TGPX allows you to make quick changes to your templates in bulk with the Search and Replace function. When you access the Search and Replace function a popup window will appear that will allow you to select the pages that you want to perform this action on, the code to search for in the template, and the replacement code to use. Multiple pages can be selected by holding down the shift or ctrl keys on your keyboard as you click on pages in the selection list. Once you have selected the pages and entered the search and replacement code, press the Search and Replace button to start the task. Once completed a message will appear at the top of the window letting you know how many replacements were made.

Custom Functions

In addition to the standard template functions, the directory templates have several custom functions available which allow you to display your categories and galleries. Each of those custom functions are described here.

{intermix} {galleries var=$submitted type=submitted amount=20 category=MIXED getnew=true} {galleries var=$permanent type=permanent amount=5 category=MIXED getnew=true} {intermix var=$galleries from=$submitted,$permanent location=+5} The {intermix} template function can be used to merge the contents of two arrays. This is mainly useful when you use two {galleries} functions to pull some galleries for display and then want to merge those two sets of galleries together so they can be displayed mixed together. For example, if you wanted to display a mix of submitted and permanent galleries having a permanent gallery inserted after every 5th submitted gallery, you would use the {intermix} function in conjunction with two {galleries} functions (one to load the submitted galleries and one to load the permanent galleries).

The {intermix} function has three attributes which must be set:

Template Variables

The following section will describe all of the available template variables you can use on your TGP page templates