Screen: ShopSite > Merchandising > Custom Templates

Custom Template Tag Specification

Page Tags

These tags can only be used in page templates.

Special Page Tags

Defines
[-- DEFINE PAGE --]
[-- END_DEFINE PAGE --]
Marks the beginning and end of the HTML for the page template. Most of the template will be contained between the [-- DEFINE PAGE --] and [-- END_DEFINE PAGE --] tags.
[-- DEFINE LINK_TO_PAGE --]
[-- END_DEFINE LINK_TO_PAGE --]
Marks the beginning and end of the HTML that defines the link that other pages will use to link to this page. These tags must come before the [-- DEFINE PAGE --] tag in a template.
Note:

These tags are not required if you are building all page links into your template. However, you must use these tags to define the links to this page if you are letting ShopSite link pages automatically.

You can use any page tags and fields in the LINK_TO_PAGE section, but the tags and fields most commonly used are:

Look at the Page Links Example to see how to use these tags to create page links.

Header and Footer
[-- PAGE.DisplayPageHeader --]
True if the merchant wants the page header displayed.
[-- IF HEADER --]
True if there is content in the page header field. By default, the option to display the page header is on, but a merchant may not have actually created content for the page header. This test allows you to provide an alternative to a big blank space at the top of such pages:

[-- IF PAGE.DisplayPageHeader --]
  [-- IF HEADER --]
    [-- HEADER --]
  [-- ELSE --]
    <!-- No Header! Show store name instead. -->
    [-- STORE.Name --]
  [-- END_IF --]
[-- ELSE --]
  <!-- Don't display header! Don't put anything here. -->
[-- END_IF --]

[-- HEADER --]
Inserts the page header.
[-- PAGE.DisplayPageFooter --]
True if the merchant wants the page footer displayed.
[-- IF FOOTER --]
True if there is content in the page footer (see IF HEADER for more information on usage).
[-- FOOTER --]
Inserts the page footer.
Loops
[-- LOOP PRODUCTS {numcolumns NONAME} --]
[-- END_LOOP PRODUCTS --]
Marks the beginning and end of a loop to insert product information on a page. Everything within the loop is repeated for each product assigned to the current page. The loop will insert products on the page in the order specified on the Arrange Items screen, or according to the rules set in the Page Arrangement Settings, or in the order in which they were added to the page if no arrangement was specified.

The optional numcolumns parameter lets you present products in rows in a table, which produces a multi-column layout. You can specify the number of columns in three ways:

The optional NONAME parameter prevents the default action of adding a named anchor tag ( for example, <a name="PRODUCTNAME"></a> ) to each product.

When used with the numcolumns parameter, the LOOP tag will be replaced with a <TR> tag, then ShopSite will loop through the number of products specified by the numcolumns parameter, and then add a </TR> tag to close the first row. It will create as many rows as needed for the products assigned to the page, and then the END_LOOP tag will be replaced with a final </TR>. You should not include <TR> and </TR> tags in your template since ShopSite puts them in automatically. Study the example multi-column page template to see how this works. There is also an example multi-column product template designed to work with the page template. The product template does not contain any tags that are explicitly for multi-column layouts, but it must work with the page template to produce correct HTML.

[-- PRODUCT {template} --]
Inserts the fields for the next product within a [-- LOOP PRODUCTS --] loop. This tag must appear on a line by itself between a [-- LOOP PRODUCTS --] and an [-- END_LOOP PRODUCTS --] tag.

The optional template value can be used to indicate a template name that will override the default product template.

The product fields that are inserted are defined by these rules:

  1. If the product template includes the tag for a field and the current product has a value for that field, the value will be inserted.
  2. If the template tag for a field is not included in the product template, the field value will never be displayed, regardless of whether it is set in the database.
  3. If the product template uses a tag, such as [-- PRODUCT.SKU --], but the SKU field has no entry, the ShopSite parser will insert an HTML comment tag indicating that the field was empty.
  4. If the "Toggle" fields for a product are set to not display certain fields, but the template includes tags for those fields, the field values will be inserted in the page. For example, if the SKU Toggle field is set to not display, but the template includes the [-- PRODUCT.SKU --] tag, the SKU will be inserted.
[-- LOOP LINKS {numcolumns} --]
[-- END_LOOP LINKS --]
Marks the beginning and end of a loop to insert links to other pages on the current page. Everything within the loop is repeated for each page link assigned to the current page. The loop will insert links on the page in the order specified on the Arrange Items screen, or according to the rules set in the Page Arrangement Settings, or in the order in which they were added to the page if no arrangement was specified.

The optional numcolumns parameter lets you present links in rows in a table, which produces a multi-column layout. See the LOOP PRODUCTS tag for more information.

[-- LINK {template}--]
Inserts the next page link within the [-- LOOP LINKS --] loop. This tag must appear on a line by itself between a [-- LOOP LINKS --] and an [-- END_LOOP LINKS --] tag. Page link information is defined in the [-- DEFINE LINK_TO_PAGE --] section, based on the Link Info fields in the pages database.

The optional template parameter specifies a name of a page template whose [-- DEFINE LINK_TO_PAGE --] section will be used to create all the links to assigned pages on this page instead of using the page template selected for each of the assigned pages. This parameter does NOT force the assigned pages themselves to be generated with this template.

[-- LOOP ITEMS {numcolumns} --]
[-- END_LOOP ITEMS --]
Marks the beginning and end of a loop to insert Items on a page. Everything within the loop is repeated for each item. Use the ITEM tags to insert product information and links to other store pages. The loop will insert items on the page in the order specified on the Arrange Items screen, or according to the rules set in the Page Arrangement Settings, or in the order in which they were added to the page if no arrangement was specified.

The optional numcolumns parameter lets you present items in rows in a table, which produces a multi-column layout. See the LOOP PRODUCTS tag for more information.

[-- ITEMS --]
Inserts the next product or page link within the [-- LOOP ITEMS --] loop. This tag must appear on a line by itself between a [-- LOOP ITEMS --] and an [-- END_LOOP ITEMS --] tag.
Gift Certificate
[-- IF GiftCert --]
Returns true if Gift Certificates are enabled.
[-- GiftCertLink --]
Inserts the link to the gift certificate order page
Search
[-- SEARCH_FORM --]
Inserts the product search form.
[-- PAGE.SearchProductField --]
Returns checked if a product search box is to be displayed on this page. Use an IF statement to determine the value:

[-- IF PAGE.SearchProductField--]
<p>[-- SEARCH_FORM --]</p>
[-- END_IF --]

[-- PAGE.IndexedForSearch --]
Returns checked if the products on this page are to be indexed for search.
Tell A Friend
[-- TELLAFRIEND LinkText --]
Creates the Tell A Friend link on a page. LinkText is the text that will be in the E-mail message link to the page, and can be a string, a VAR, or Name:

[-- TELLAFRIEND Name --] (creates the link as the Page Name)

or

[-- TELLAFRIEND VAR.mylinktext --] (creates the link as the value of VAR.mylinktext)

or

[-- TELLAFRIEND "This Page" --] (creates the link as "This Page")

Customer Registration
[-- RegistrationSignIn --]
Inserts links for customer registration and login. These links are generated via JavaScript, which detects the login status of the customer and generates the appropriate links. See Custom Sign-In Script for information on customizing the appearance of the links.
[-- STORE.NewCustomer --]
text: New Customer?
[-- STORE.ToRegister --]
text: Click here to register
[-- STORE.RetCustomer --]
text: Returning Customer?
[-- STORE.ToSignIn --]
text: Click here to sign in
[-- STORE.ViewEdit --]
text: View/Edit account
[-- STORE.SignOut --]
text: Sign out
High Security Image
[-- IF ShopSiteSecurityImage --]
True if ShopSite is configured to display the High Security image.
[-- ShopSiteSecurityImage --]
Returns the HTML code to display the High Security image on the page.
Mini Cart
[-- MiniCart --]
Displays the Mini Cart on store pages.

Page Database Tags

Page database tags insert the contents of a field from the pages database. For example, [-- PAGE.Text1 --] returns the contents of the page's Text 1 field. Most page database tags can also be used in an IF tag to test for a value.

All page database tags that return merchant-defined text can be used with the Remove_HTML parameter, which removes any HTML from the field before displaying it. This can be useful if, for example, you have put HTML tags in the page name field to format how the name is displayed, but also want to use the page name in the <title> tag, which does not allow formatting.

Name
[-- PAGE.Name --]
The name of the page, as entered in the Page Name field. Note that the page name is not the same as the pages's file name. Common places to use this field are in the <TITLE> and as the highest level heading on the page.
[-- PAGE.DisplayName --]
Returns checked if the page name is to be displayed. Use an IF statement to determine the value:

[-- IF PAGE.DisplayName --]
<H1>[-- PAGE.Name --]</H1>
[-- END_IF --]

Title
[-- PAGE.Title --]
The text to be used in the Title tag in the HTML head.
Banner Graphic
[-- PAGE.Graphic --]
Returns a full <img src> tag with all the formatting information, including size and alt values. For example:

[-- PAGE.Graphic --]

returns a tag in this format:

<img src="http://www.store.com/media/graphic.gif" width=50 height=40 alt="Example" hspace=3 vspace=3 border=0>

Use the REMOVE_HTML attribute to return a partial tag that you can customize:

[-- PAGE.Graphic REMOVE_HTML --]

does not return the beginning and end of the <img> tag:

src="http://www.store.com/media/graphic.gif" width=50 height=40 alt="Example" hspace=3 vspace=3 border=0

[-- IMAGE Page.Graphic --]
Returns the path and file name of the page banner graphic, relative to the store’s media directory.
[-- PAGE.DisplayGraphic --]
Returns checked if the page graphic is to be displayed. Use an IF statement to determine the value:

[-- IF PAGE.DisplayGraphic --]
<P>[-- PAGE.Graphic --]</P>
[-- END_IF --]

Text
[-- PAGE.Text1 --]
The contents of the Text 1 field for the page.

Note: Although merchants can put HTML tags in most fields to format their contents, the Text fields are most likely to contain extensive HTML tags, including tables, lists, and even <img src> tags.

[-- PAGE.Text2 --]
The contents of the Text 2 field for the page. See the note for the Text1 field.
[-- PAGE.Text3 --]
The contents of the Text 3 field for the page. See the note for the Text1 field.
Link
[-- PAGE.LinkName --]
The name that is to be used on other pages as a link to the current page. Use this tag between the [-- DEFINE LINK_TO_PAGE--] and [-- END_DEFINE LINK_TO_PAGE--] tags.
[-- PAGE.LinkGraphic --]
Returns a full <img src> tag with all the formatting information, including size and alt values, of the graphic that is to be used on other pages as a link to the current page. Use this tag between the [-- DEFINE LINK_TO_PAGE--] and [-- END_DEFINE LINK_TO_PAGE--] tags. Use the REMOVE_HTML attribute if you want to customize the <img> tag, as described for the PAGE.GRAPHIC tag.
[-- PAGE.LinkText --]
Additional text that appears on other pages with links to the current page. Use this tag between the [-- DEFINE LINK_TO_PAGE--] and [-- END_DEFINE LINK_TO_PAGE--] tags.
[-- PAGE.TextWrap --]
Returns "on" if link text is to wrap under the link graphic, and "off" if the text is to appear beside the graphic. Use this tag between the [-- DEFINE LINK_TO_PAGE--] and [-- END_DEFINE LINK_TO_PAGE--] tags.
Layout
[-- PAGE.Layout --]
Returns the alignment to be applied to products and page links on the page. Possible values are:
[-- PAGE.Columns --]
Returns the number of columns to be used to format products. Possible values are:
[-- PAGE.LinkColumns --]
Returns the number of columns to be used to format page links on the page. Possible values are:
[-- PAGE.DisplayColumnBorders --]
Returns checked if column borders are to be displayed.
[-- PAGE.PageWidth --]
Returns a string indicating the page width that is to be used to display information, either as a percentage or in pixels used. Possible values are:
Colors and Background
[-- PAGE.TextColor --]
Returns the hex value of the text color for the page, preceded by a pound sign (#), such as #CC3333.
[-- PAGE.BackgroundColor --]
Returns the hex value of the background color for the page, preceded by a pound sign (#), such as #CC3333.
[-- PAGE.LinkColor --]
Returns the hex value of the color for links on the page, preceded by a pound sign (#), such as #CC3333.
[-- PAGE.VisitedLinkColor --]
Returns the hex value of the color for visited links on the page, preceded by a pound sign (#), such as #CC3333.
[-- PAGE.ActiveLinkColor --]
Returns the hex value of the color of links on the page at the moment they are clicked, preceded by a pound sign (#), such as #CC3333.
[-- PAGE.BackgroundImage --]
If a graphic is defined as a background image for the page, returns the full URL of that image. Use the REMOVE_HTML attribute if you want to customize the <img> tag, as described for the PAGE.GRAPHIC tag.
File Name
[-- PAGE.Filename --]
The file name of the page. If the merchant left this field blank, the default file name is returned, such as Page1.html.
Search Result Product Link Fragment
[-- SEARCHPRODUCTLINK --]
Creates a page link fragment string using the product ID. The fragment string, which would look like #103 (the numbers will change based off the product ID number) can then be appended to an anchor tag in a LINK_TO_PAGE definition for a Search override page template. The overall result is that search results links will go to the position on the page where the product is, rather than just the top of the page. The anchor tag in the LINK_TO_PAGE definition would look something like this:

<a href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --][-- SEARCHPRODUCTLINK --]">

Meta Tags
[-- PAGE.MetaKeywords --]
The list of words to put in the META NAME="keywords" tag in the HEAD section of the page.
[-- PAGE.MetaDescription --]
The text to put in the META NAME="description" tag in the HEAD section of the page.
Multipage Generation
[-- PAGE.ProductsPerPage --]
Number of products to appear on a generated page; 0 = all.
[-- PrevNext {NoCenter} --]
Insert multipage navigation links. By default, the links are centered. Use the NoCenter attribute to remove the <center> tags.
[-- PAGE.PaginatedPageNum --]
Current page number when multipages/pagination is used.
[-- PAGE.PaginatedPageNumMax --]
Maximum number of pages when multipages/pagination is used.
Assigned Items
[-- PAGE.NumProducts --]
The number of products assigned to the current page.
[-- PAGE.NumLinks --]
The number of links to other ShopSite pages assigned to the current page.
[-- PAGE.NumItems --]
The total number of products and page links assigned to the page.
Merchant-Definable Fields
[-- STORE.PageField1 --]
[-- STORE.PageField2 --]
[-- STORE.PageField3 --]
[-- STORE.PageField4 --]
[-- STORE.PageField5 --]
[-- STORE.PageField6 --]
[-- STORE.PageField7 --]
[-- STORE.PageField8 --]
[-- STORE.PageField9 --]
[-- STORE.PageField10 --]
[-- STORE.PageField11 --]
[-- STORE.PageField12 --]
[-- STORE.PageField13 --]
[-- STORE.PageField14 --]
[-- STORE.PageField15 --]
[-- STORE.PageField16 --]
[-- STORE.PageField17 --]
[-- STORE.PageField18 --]
[-- STORE.PageField19 --]
[-- STORE.PageField20 --]
[-- STORE.PageField21 --]
[-- STORE.PageField22 --]
[-- STORE.PageField23 --]
[-- STORE.PageField24 --]
[-- STORE.PageField25 --]
Display the configured name for the specified merchant definable field.
[-- PAGE.Field1 --]
[-- PAGE.Field2 --]
[-- PAGE.Field3 --]
[-- PAGE.Field4 --]
[-- PAGE.Field5 --]
[-- PAGE.Field6 --]
[-- PAGE.Field7 --]
[-- PAGE.Field8 --]
[-- PAGE.Field9 --]
[-- PAGE.Field10 --]
[-- PAGE.Field11 --]
[-- PAGE.Field12 --]
[-- PAGE.Field13 --]
[-- PAGE.Field14 --]
[-- PAGE.Field15 --]
[-- PAGE.Field16 --]
[-- PAGE.Field17 --]
[-- PAGE.Field18 --]
[-- PAGE.Field19 --]
[-- PAGE.Field20 --]
[-- PAGE.Field21 --]
[-- PAGE.Field22 --]
[-- PAGE.Field23 --]
[-- PAGE.Field24 --]
[-- PAGE.Field25 --]
Display the contents of the specified merchant definable field.

ShopSite Help and Resource Center
Last updated: March 01, 2010
Give Feedback


ShopSite Shopping Cart Software