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:
- PAGE.LinkName
- PAGE.LinkGraphic
- PAGE.LinkText
- PAGE.FileName
- [-- OUTPUT_DIRECTORY_URL --]
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.
- [-- HEADER --]
- Inserts the page header.
- [-- PAGE.DisplayPageFooter --]
- True if the merchant wants the page footer displayed.
- [-- FOOTER --]
- Inserts the page footer.
Loops
- [-- LOOP PRODUCTS {numcolumns} --]
[-- 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:
- PAGE.Columns, which uses the number of columns set by the merchant for the page
- A number, to define a fixed number of columns
- VAR.xxx, to use a variable value set previously in the template
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:
- 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.
- 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.
- 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.
- 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 field specifies a name for a link (page) template that will override the default page 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.
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
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 --]
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:
- Left aligned
- Right aligned
- Staggered; Start left
- Staggered; start right
- Centered
- [-- PAGE.Columns --]
- Returns the number of columns to be used to format products and page links on the page. Possible values are:
- One column
- Two columns
- Three columns
- Four columns
- Five columns
- [-- PAGE.DisplayColumnBorders --]
- Returns checked if column borders are to be displayed.
- [-- PAGE.PageWidth --]
- Returns a string indicating the percentage of the page width that is to be used to display information. 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.
Search
- [-- 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>[-- PAGE.SEARCH_FORM --]</p>
[-- END_IF --]
- [-- PAGE.IndexedForSearch --]
- Returns checked if the products on this page are to be indexed for search.
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.
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
- [-- PAGE.Field1 --]
[-- PAGE.Field2 --]
[-- PAGE.Field3 --]
[-- PAGE.Field4 --]
[-- PAGE.Field5 --]
- Extra fields that the merchant can use for any purpose. These fields can hold text and HTML.