ez.no / exponential / documentation / customization / custom design / examples / creating a navigation path
With some help from the demo site and Bruce Morrison:
{section show=ne($node.node_id,21)} <h1 class="contenttitle">{$node.name}</h1> <h2 class="crumbs"> <a href="/">Home</a> {section name=Path loop=$module_result.path offset=2 max=-1} <span style="color: black"> > </span> <a href={$Path:item.url|ezurl}>{$Path:item.text}</a> {/section} </h2> {/section}
The $module_result.path is an array. I skip the first item (offset=2) as it's the name of home folder which is in my case something else then "home". I also skip the last item (which is the current page and it's shown in the above it already.) As I don't like the crumbs on the homepage, I use the show=ne($node.node_id,21) to hide it on the home node (who's ID is 21)
as a result this will show something like:
home > folder
Log in or create a user account to comment.
Comments
Why the original navigation trail suggestion doesn't work - and a fix
Lonnie VanZandt
Friday 26 November 2004 11:57:41 pm
{section show=ne($node.node_id,101)}
<div id="navtrail">
<div class="crumbs">
<a href={"/"|ezurl} title="Click here to go back...">Home</a>
{section name=Path loop=$module_result.path offset=1 max=$module_result.path|count|sub(2) }
<span> / </span> <a href={$Path:item.url|ezurl} title="Click here to go back...">{$Path:item.text}</a>
{/section}
</div>
</div>
{/section}
Creating a navigation path - did not work
Felix Laate
Saturday 17 April 2004 12:21:45 am
{* Navigation Path *}
<h3>
<a href="/">Home</a>
{let count=$module_result.path|count offset=2 sub=1}
{let var=sub( $count, $offset, $sub ) }
{section name=Path loop=$module_result.path
offset=$offset
max=$var }
<span style="color: black"> > </span>
<a href={$Path:item.url|ezurl}>{$Path:item.text}</a>
{/section}
{/let}
</h3>
{*{/section}*}
</div>
{* end navigation path*}
this will help
Bj�rn Dieding@xrow.de
Monday 15 September 2003 10:06:17 pm
is the key
you will find all info in it.
"home" in this case is the name of the siteroot folder it can be translated for every language
in this case I would call it "english" and translate it with the name of each other language
Make it dynamic?
RW Wood
Monday 15 September 2003 7:44:16 pm
Thanks.
RWW