User Tools

Site Tools


en:public:developer:template_system:tags:navigation:tbreadcrumbs

This is an old revision of the document!


<#TBreadcrumbs>

This tag permit to construct a Breadcrumbs. It is a navigation aid used in user interfaces, it allows users to keep track of their locations within programs or documents. The term comes from the trail of breadcrumbs left by Hansel and Gretel in the popular fairytale.

Parameters

  • template_container - The main template that will contain all the items. default value is
<#breadcrumbs_items.text>
  • template_item - the template of one item. Default value is
<#if condition="(<#breadcrumbs_current_item.index> >= 1)">&gt; <#endif>
<#if condition="(<#breadcrumbs_current_item.index> < <#breadcrumbs_items.count> - 1)"><a href="<#breadcrumbs_current_item.url>"><#endif>
<#breadcrumbs_current_item.title>
<#if condition="(<#breadcrumbs_current_item.index> < <#breadcrumbs_items.count> - 1)"></a> <#endif>

cfgpages configuration

The breadcrumps is build like an hierarchical site structures (the parent pages of the current one). this hierarchical site structures is taken from the cfgpages. if for exemple the cfgpages contain the nodes

  <page name='/'>
    <page name='real-estate'>  
      <page name='residential'>  
        <page name='holiday-rentals' />
      </page>
    </page>
  </page>

then the breadcrumps on the page /real-estate/residential/holiday-rentals/ will be “Home > Real Estate > Residential > Holiday rentals”

Each <page> nodes in the cfgpages xml file must also contains in their <cfg> child node one <breadcrumbs> node that contain the neccessary params to build the breadcrumps

<page name="...">
  <cfg>
    ...
    <breadcrumbs>
      <visible>1</visible>
      <expend_after_geoplace>1</expend_after_geoplace>
      <title>REAL ESTATE</title>
    </breadcrumbs>
    <title>Real Estate</title>
    ... 
  </cfg>
</page>  
  • <visible> - 1 or 0 (default): used to say if the current node must be show in the Breadcrumps
  • <expend_after_geoplace> - 1 or 0 (default): Insert after the current node the geo place items (ie: > United States > Illinois > Cook > Chicago > Near North Side in our exemple)
  • <title> - Used for the title of the current node. by default it's taken from cfg.breadcrumbs.title and if empty them from cfg.title

Example

<#{breadcrumbs>
  <#{template_Container>
    <#htmlbox template="box_14_2.html"
              box_title="<#page_title>"
              box_content="<#breadcrumbs_items.text>">
  <#}template_Container>
  <#{template_item>
    <#if condition="(<#breadcrumbs_current_item.index> >= 1)">&gt;<#endif>
    <#if condition="(<#breadcrumbs_current_item.index> < <#breadcrumbs_items.count> - 1)"><a href="<#breadcrumbs_current_item.url>"><#endif>
    <#breadcrumbs_current_item.title>
    <#if condition="(<#breadcrumbs_current_item.index> < <#breadcrumbs_items.count> - 1)"></a><#endif>
  <#}template_item>
<#}breadcrumbs>
en/public/developer/template_system/tags/navigation/tbreadcrumbs.1366818487.txt.gz · Last modified: 2013/04/24 19:48 by svanderclock