Cart    Account    Contact    Newsletter Signup    Showcase    Login    Signup

Developers Docs

Catalog

The catalog tag is a powerful tag for displaying your products and categories. By design the tag displays products in the category who's url_title matches value of the second segment in the url. NOTE: you can provide the url_title directly to the tag with the url_title parameter. 
Additional settings for the catalog default pagination records returned are located in the BrilliantRetail > Settings > Site:Catalog section. 

Parameters
  • url_title (optional | default = '{segment_2}' ) - The catalog is tag is built on the category url_title.
internal Tags
  • no_results (pair) - Message to display if no products were available for the category
  • result_filter_set (pair) - Displays the current selections in the fauceted navigation.
    • filter_set_section (single) - The section that you are filtering from
    • filter_set_label  (single) - The section value that filtered too
    • filter_set_remove  (single) - Url to remove the selection
  • category_image (single)
  • category_id (single)
  • category_title (single)
  • meta_title (single)
  • meta_descr (single)
  • meta_keyword (single)
  • result_paginate (pair)
    • show_paginate (single) - 'yes' if pagination occurs | 'no' if not
    • result_range (single) - The range of the current pagination selection 
    • total_results (single) - All of the products available
    • pages (pair) - List of the pages availble in pagination
      • link_page (single) - url to given pagination page.
    • back (pair) - Back text in pagination and is only visible when necessary
      • link_back (single) - url to go back 
  • mode (single) - returns either 'grid' or 'list' depending on the selected view mode
  • link_grid (single) - url to change to grid mode
  • link_list (single) - url to change to list mode
  • sort_selected (single) - returns eith relevence, price, or name based on selected sort
  • link_sort_relevence  (single) - url to change to sort by relevance 
  • link_sort_price (single) - url to change to sort by price 
  • link_sort_name (single) - url to change to sort by name
  • results (pair) - Includes all of the internal tags of the product tag.
    • product_switch (single) - Standard switch syntax {product_switch="a|b|c"} (added v1.0.1.2+) 
  • result_paginate_bottom (pair) - Same internal tags and syntax as result_paginate


Example for Blank Theme (catalog/index)

{exp:brilliant_retail:catalog url_title="{segment_3}"}

     {result_filter_set}
           <b>{filter_set_section}:</b> {filter_set_label} 
           <a href="{path='{filter_set_remove}'}" class="remove_filter">X</a>
     {/result_filter_set}

     {exp:brilliant_retail:catalog_layered url_title="{segment_3}"}
           <h4>{result_layered_label}:</h4>
           <ul class="shopby">
                {result_layered_item}
                     <li>
                         <a href="{path='{result_layered_link}'}">
                              {result_layered_title} {result_layered_count}</a></li>
                {/result_layered_item}
           </ul>
     {/exp:brilliant_retail:catalog_layered}

     {if '{category_image}' != ''}
           <div id="banner">
                <img src="{category_image}" alt="" />
           </div> <!-- banner -->
     {/if}

     <p class="items">
          {result_paginate}
               {if '{show_paginate}' == 'yes'}
                    {result_range} of {total_results} Items |
                    {back} <a href="{path='{link_back}'}">«</a> {/back}
               {if:else}
                    {total_results} Items |
               {/if}
               {pages}
                     <a href="{path='{link_page}'}"
                        {if '{link_active}' == 'yes'}class="active"{/if}>{page_number}</a>
               {/pages}
              
               {if '{show_paginate}' == 'yes'}
                     {next}
                          <a href="{path='{link_next}'}">»</a>
                     {/next}
                     |<a href="{path='{link_show_all}'}">Show All</a>
               {/if}
          {/result_paginate}
     </p>

     <p class="sort">
        <b>View:</b>
          <a href="{path='{link_grid}'}"
             {if '{mode}' == 'grid'}class="active"{/if}>Grid</a> |
          <a href="{path='{link_list}'}"
             {if '{mode}' == 'list'}class="active"{/if}>List</a>
        <b>Sort by: </b>
          <a href="{path='{link_sort_relevance}'}"
             {if '{sort_selected}' == 'relevance'}class="active"{/if}>Relevance</a> |
          <a href="{path='{link_sort_price}'}"
             {if '{sort_selected}' == 'price'}class="active"{/if}>Price</a> |
                 <a href="{path='{link_sort_name}'}"
                    {if '{sort_selected}' == 'name'}class="active"{/if}>Name</a>
     </p>

     <div class="clearboth"><!-- --></div>

     {no_results}
           <div id="br_alert">This category contains no products</div>
     {/no_results}

     <div id="{mode}">
           <ul>
                {results}
                
   {!--
                        Show the results. By default the system will show in grid mode.
                    !--}
                  
                    {if '{mode}' == 'grid'}

                         <li>
                                <a href="{path='product/{url}'}"><img class="overlay" src="{theme}/images/0.gif" alt="" /></a>
                                <div>
                                     <a href="{path='product/{url}'}" style="height:200">
                                        {exp:brilliant_retail:image src="{image_thumb}" width="175" height="210"}</a>
                                </div>
                                <p class="title"><a href="{path='product/{url}'}">{exp:snippet total="60"}{title}{/exp:snippet}</a></p>
                                {price_html}
                         </li>
                    {if:else}
                         <li>
                              <div class="pic">
                                 <a href="{path='product/{url}'}">{exp:brilliant_retail:image src="{image_thumb}" width="75" height="90"}</a></div>
                              <div class="desc">
                                 <h5><a href="{path='product/{url}'}">{title}</a></h5>
                                 <p>{exp:snippet total="200"}{detail}{/exp:snippet}</p>
                                 <p><a href="{path='product/{url}'}">+Add to cart</a></p>
                              </div>
                              <div class="price">{price_html}</div>
                              <div class="clearboth"><!-- --></div>
                         </li>
                    {/if}
                {/results}

          {result_paginate_bottom}
                {if '{show_paginate}' == 'yes'}
                     {result_range} of {total_results} Items |
                     {back}<a href="{path='{link_back}'}">«</a> {/back}
                {if:else}
                      {total_results} Items |
                {/if}
                {pages}<a href="{path='{link_page}'}" {if '{link_active}' == 'yes'}class="active"{/if}>{page_number}</a> {/pages}
                {if '{show_paginate}' == 'yes'}
                      {next}<a href="{path='{link_next}'}">»</a> {/next}|
                      <a href="{path='{link_show_all}'}">Show All</a>
                {/if}
          {/result_paginate_bottom}

{/exp:brilliant_retail:catalog}

Comments

  • By Lyndsy Atkins on Tuesday April 5th, 2011 at 11:01am

    I catalog tag now supports the form_open and form_close tags

Add Your Comments


You must be logged in to comment.