Hi All
I have been looking for a way to show the first level navigation and the sub nav for the page you are current on (second level).
For example if the whole nav looks like:
Home
About Us
Who is in the team
Personal Bio
Interesting Facts
Interesting Fact 1
Interesting Fact 2
Contact us
But I am in ‘Who is in the team’ and I want to show :
Home
About Us
Who is in the team*
Personal Bio
Interesting Facts
Contact us
I have come up with the following solution, but would be grateful if anyone has a better solution.
{exp:structure_entries depth=“2”}
{if {depth} == 1}{title}
{/if}
<?php
$segArray = “{page_uri}”;
$segArray = explode(”/”, $segArray);
if (($segArray[3] == “{segment_1}”) && ($segArray[4] !== “”)) echo “<li>{title}</li>”;
?>
{/exp:structure_entries}
Thanks in advance
Dan
