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>
[-- IF SEARCHTOP --]Note that the closing </form> tag is not generated by a template tag and must be included in the template.
<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 --]
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: March 01, 2010 Give Feedback |
ShopSite Shopping Cart Software |