Screen: ShopSite > Merchandising > Custom Templates

Custom Template Tag Specification

Search Tags

These tags can only be used in Search templates.

Defines
[-- DEFINE SEARCH_RESULTS --]
[-- END_DEFINE SEARCH_RESULTS --]
Defines the beginning and ending of the HTML code for the search results page.
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 SEARCH {numcolumns}--]
[-- END_LOOP SEARCH --]
Marks the beginning and end of the loop that inserts the results from the search.

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

When used with the numcolumns parameter, the LOOP tag will be replaced with a <TR> tag, then ShopSite will loop through the number of results 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.

[-- SEARCHRESULT --]
The search results are inserted into the loop at the point specified by this tag. Each search result consists of two parts, the Product portion, and the Link portion. The [-- SEARCHRESULT --] tag must be on a line by itself between the [-- LOOP SEARCH --] and [-- END_LOOP SEARCH --] tags.
[-- IF SEARCHPRODUCT --]
The Product portion of a search result uses the Product Template assigned to the product, or the Search Override Product Template, depending on your settings in the Search Layout screen of the ShopSite Back Office. You can use the SEARCHPRODUCT element within a search loop to insert additional information before or after the product portion of a search result.

The following example illustrates using the SEARCHPRODUCT element to control the presentation of search results.

<table border="1">
[-- LOOP SEARCH --]
  [-- IF SEARCHPRODUCT --]
    <td>Product:</td>
  [-- END_IF --]
  [-- IF SEARCHLINK --]
    <td>Link:</td>
  [-- END_IF --]
  [-- SEARCHRESULT --]
[-- END_LOOP SEARCH --]
</table>
[-- IF SEARCHLINK --]
The link portion of a search result uses the LINK_TO_PAGE definition of the appropriate Page template, based on the settings in the Search Layout screen in the Back Office. The SEARCHLINK element can be used within a search loop to insert additional information before or after the link portion of a search result.
[-- IF SEARCHACTIVE --]
True if search results screen is being generated
Search Form
[-- IF SEARCHTOP --]
Returns true if the merchant selected to have the search form displayed at the top of the page.
[-- IF SEARCHBOTTOM --]
Returns true if the merchant selected to have the search form displayed at the bottom of the page.
[-- SEARCHRESULT_FORM --]
Inserts the HTML source for the complete search form, including (if enabled) the search form input box, search button, number of results, results per-page links, results per-page selection field, and results sort field.
[-- SEARCHRESULT_FORM FORM_ONLY --]
Inserts the HTML source code for only the form and (if enabled) search input box and button. this can be used along with the [-- SearchResultCount --], [-- SearchPrevNext --], [-- SearchResultsPerPage --], and [-- SearchSortBy --] tags to control the appearance of these features. For example:
[-- IF SEARCHTOP --]
<div class="search_term">[-- SEARCHRESULT_FORM FORM_ONLY --]</div>
<div class="search_sort"><table class="search_sort">
  <tr>
  [-- IF --]
    <td class="sort_by">[-- SearchSortBy --]</td>
  [-- END_IF --]
  [-- IF --]
    <td class="result_count">[-- SearchResultCount --]</td>
  [-- END_IF --]
  [-- IF --]
    <td class="prev_next">[-- SearchPrevNext --]</td>
  [-- END_IF --]
  [-- IF --]
    <td class="per_page">[-- SearchResultsPerPage --]</td>
  [-- END_IF --]
  </tr>
</table></form></div>
[-- END_IF --]
Note that the closing </form> tag is not generated by a template tag and must be included in the template.
[-- SearchResultCount --]
Returns the total number of search results available. Use in IF to test if it should be displayed.
[-- SearchPrevNext --]
Generates links for additional pages of search results. Use in IF to test if it should be displayed.
[-- SearchResultsPerPage --]
Generates the form field for selecting how many results should be shown on a page. Use in IF to test if it should be displayed.
[-- SearchSortBy --]
Generates the form field for selecting how to sort the results. Use in IF to test if it should be displayed.
[-- SEARCHSTRING --]
The search string entered into the search form.
[-- STORE.SearchImage --]
The URL for the search button image.

Search 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.

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:

[-- PAGE.IF PAGE.DisplayName --]
<H1>[-- PAGE.PAGE.Name --]</H1>
[-- PAGE.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:

[-- PAGE.IF PAGE.DisplayGraphic --]
<P>[-- PAGE.PAGE.Graphic --]</P>
[-- PAGE.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.
[-- Store.SearchResults --]
The contents of the Search Results text field.
[-- Store.SearchResultPage --]
The contents of the Results Pages text field.
[-- STORE.QuantityPricingFlag --]
The contents of the Quantity Pricing Flag field.
[-- Store.QuantityPricingMsg --]
The contents of the Quantity Pricing Message text field.
[-- STORE.VariablePricingFlag --]
The contents of the Variable Pricing Flag text field.
[-- Store.VariablePricingMsg --]
The contents of the Variable Pricing Message text field.
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 and 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 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.
Gift Certificate
[-- IF GiftCert --]
Returns true if Gift Certificates are enabled.
[-- GiftCertLink --]
Inserts the link to the gift certificate order 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
Mini Cart
[-- MiniCart --]
Displays the Mini Cart on store pages.
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.

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


ShopSite Shopping Cart Software