Page Templates: Complete Basic Example

This page contains a complete example of a simple page template. It does not use any [-- IF --] or [-- INCLUDE --] tags, and it does not use a style sheet for formatting -- just simple, easy-to-read HTML with custom template tags.

  • The template uses a two-column table to put the links in the left column and the product information in the right column.
  • The page names are used as the page links. Link names and graphics are ignored.
  • The template does not test whether the merchant wants the page name or graphic displayed; it just displays them.
  • The template does not test to make sure that fields have values.
    [-- DEFINE LINK_TO_PAGE --]
    <a href="[-- OUTPUT_DIRECTORY_URL --]/[-- Page.FileName --]">[-- PAGE.Name --]</a>
    [-- END_DEFINE LINK_TO_PAGE --]

    [-- DEFINE PAGE --]
    <html>
    <head>
    <title>[-- PAGE.Title --]</title>
    </head>

    <body>
    [-- HEADER --]
    [-- PAGE.Graphic --]
    <h1>[-- PAGE.Name --]</h1>

    <table cellpadding="15">
    <tr><td valign="top">
    [-- LOOP LINKS --]
    [-- LINK --]<br>
    [-- END_LOOP LINKS --]
    </td>

    <td>
    [-- PAGE.Text1 --]
    <table>
    [-- LOOP PRODUCTS --]
    <tr><td>
    [-- PRODUCT --]
    </td></tr>
    [-- END_LOOP PRODUCTS --]
    </table>

    [-- PAGE.Text2 --]
    </td></tr>
    </table>

    [-- FOOTER --]
    [-- PAGE.Text3 --]
    </body>
    </html>
    [-- END_DEFINE PAGE --]
Return To: Page Template Home Page