The template wizard will assist you in creating the necessary {galleries} functions to pull galleries from the database and will also generate the {foreach} function to display each of the galleries on your page. This document will cover how to use the template wizard.
Accessing the Template Wizard
To access the template wizard use the TGP Pages > Edit Templates function. This will load the page where you edit your templates. In the header bar of this page that reads TGP Page Templates you can click on the icon to access the template wizard.
Basic Overview
The template wizard is something that will help you to generate the {galleries} and {foreach} commands that you will need to use to pull galleries from the database and display them on your page.
For HTML templates, the wizard will not generate a complete template for you with all of the HTML code that you need for a full page. It is designed to give you the code you need for a specific section of galleries. For example, if you want to quickly generate the template code necessary to display 20 thumbnail galleries on the page, you can use the template wizard. The code that the wizard creates will need to be inserted into your TGP page template code at the location where you want the galleries to appear.
For RSS feed templates, the wizard will generate the complete template for you. You will simply need to copy the entire generated template code and save it for the RSS feed template. Make sure your RSS feed templates have a .xml, .rdf, or .rss file extension!
Remember, you are not limited to a single section of galleries per page; you can have as many sections as you want. Therefore, you can use the wizard multiple times to
create all of the template code you will need for your page to pull galleries for each of the sections of galleries that you want to display on the page.
General Options
The General Options section of the template wizard will allow you to conifgure some basic settings for the template functions you will be generating. Each of the settings you can configure are described below.
Number of Galleries | Enter the total number of galleries you would like to display in the section you are generating |
Display As |
Select how you would like the galleries displayed Thumbnails - This will generate some default HTML code to display thumbnail previews for the galleries Text Links - This will generate some default HTML code to display text links for the galleries |
Display in Rows | This is mainly useful when you are displaying the galleries as thumbnails and will tell the wizard to automatically generate the HTML table code necessary to display the thumbnails in several rows. For example, if you tell the wizard to display 25 galleries and enter 5 galleries per row, this will generate an HTML table that will display the thumbnails in a 5x5 table. |
Type of Galleries | This allows you to select the type(s) of galleries you would like displayed in this section. You can select a percentage of submitted and permanent galleries to display. When you change the percentages, the number of each type will be displayed in parenthesis after the type name. |
Mix Method |
If you select a mixed percentage of galleries for the Type of Galleries setting, you will be able to select how the
galleries are mixed together. Random - Permanent galleries will be placed at random locations within the submitted galleries. Specific Interval - Enter a number which indicates the interval at which galleries will be mixed. For example, using 2 will place a permanent gallery after every 2nd submitted gallery. Specific Locations - Enter a comma seprated list of where you want the galleries placed. For example, using 2,4,6,8 would place a permanent gallery after the 2nd, 4th, 6th, and 8th submitted gallery. |
This section will allow you to configure the settings that will determine which submitted galleries will be pulled for display in this section. These options will only be available if the submitted gallery percentage is greater than 0. The majority of these options should be self explanitory. Those that require additional explanation are listed below.
Preview Size | If you are requiring that galleries in this section have a preview thumbnail, select the size of preview thumbnail that should be displayed. You can also enter a custom size by selecting the Custom --> option and filling in the width and height in the text box following the drop down selection field. |
Categories | Select the categories that you want displayed in this section. The ANY CATEGORY option will allow galleries from all categories in this section. You can select more than one category by clicking the icon. |
Exclude Categories | If you want to display all categories in this section except for a few, set the Categories option to ANY CATEGORY and select the categories that you don't want to show for this setting. |
Sponsors | Select the sponsors that you want displayed in this section. The ANY SPONSOR option will allow galleries from all sponsors in this section. You can select more than one sponsor by clicking the icon. |
Exclude Sponsors | If you want to display all sponsors in this section except for a few, set the Sponsors option to ANY SPONSOR and select the sponsors that you don't want to show for this setting. |
Gallery Weight | If you select anything other than Don't Care you will need to enter the weight value in the text box following this drop down selection field. |
Sort new galleries by | Use this option to select the order in which new galleries will be displayed when they are pulled from the database during a Build With New type of build. You can select sub-sorting options by clicking the icon. |
Sort new galleries by | Use this option to select the order in which galleries will be displayed when a Build type of build is done. You can select sub-sorting options by clicking the icon. |
This section will allow you to configure the settings that will determine which permanent galleries will be pulled for display in this section. These options will only be available if the permanent gallery percentage is greater than 0. The options in this section are the same as the Submitted Gallery Options.