Screen: ShopSite > Merchandising > Custom Templates
These tags can only be used in Search templates.
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.
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>
Page database tags insert the contents of a field from the pages database. For example,
[-- PAGE.IF PAGE.DisplayName --]
<H1>[-- PAGE.PAGE.Name --]</H1>
[-- PAGE.END_IF --]
[-- 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
[-- PAGE.IF PAGE.DisplayGraphic --]
<P>[-- PAGE.PAGE.Graphic --]</P>
[-- PAGE.END_IF --]
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.
ShopSite Help and Resource Center Last updated: August 27, 2004 Give Feedback |
© 2007, ShopSite, Inc. ShopSite Shopping Cart Software |