Jump to content

Get navigation item titles in navBar template


Tom Christian

Recommended Posts

Inside the navBar template, it contains:

{{foreach $extensions as $id => $nav}}
{{if $nav->canView()}}
	{{$id = uniqid();}}
	<li data-role='navItem'>
		<a id="elNavigation_app_{expression="strtok( $id, '_')"}_{$id}" href='{$nav->link()}' {{if $nav->active()}}class='ipsNavActive'{{endif}} {{if $children = $nav->children()}}data-ipsMenu data-ipsMenu-activeClass='ipsNavActive_menu'{{endif}}>
			{$nav->title()}
			{{if $children}}
				&nbsp;<i class='fa fa-angle-down'></i>
			{{endif}}
		</a>
		{{if $children}}
			<ul id="elNavigation_app_{expression="strtok( $id, '_')"}_{$id}_menu" class="ipsMenu ipsMenu_auto ipsHide">
				{template="navBarChildren" app="core" group="global" params="$children"}
			</ul>
		{{endif}}
	</li>
{{endif}}
{{endforeach}}

{$nav->title()} outputs the title of each tab. 

I need to use the name of each tab to access items within my own array but if I print_r($nav->title()); all the items are hashed like below:

string(32) "c257dbfb032b47668473c554413fc6b9" string(32) "3ba3e17df4a0e5477ea3e770f5385526" string(32) "deee72195b4e91afaba854cf4db8ad84" string(32) "7040cfecc4c7ec2bcec42105c9d6351d" string(32) "9eb0a9e198bcdb87b588e5e65260e940" string(32) "c2b9b67e2a832c39183928a3f2508cd7" string(32) "10387a5655f062c76aa13adf11290de1" string(32) "c4575cc334d5ce866c917fd3f93aa462"

Because of this, I can't access my items. Any suggestions?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...