Hi everyone,
I am trying to achieve the following...
So, for example, if you're in a main section page, the full sub nav is displayed and main section item is highlighted. If you are in a sub page, fulll sub nav is displayed and main section and sub section are highlighted... you get the idea...
This should be in the form of unordered lists like so...
<ul>
<li><a href="">Parent1</a></li>
<li class="active"><a href="">Parent2</a>
<ul>
<li><a href="">Child1</a></li>
<li class="active"><a href="">Child2</a>
<ul>
<li><a href="">Grand Child1</a></li>
<li class="active"><a href="">Grand Child2</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="">Parent3</a></li>
</ul>
You get the idea...
Has anyone got an ideas on how is best to do this? I'm at my wits end. Or if anyone has a link to somewhere where this is explained, that would be great.
I have a database with a pages tables similar to...
id
name
parent_id (each page only has one parent)
In an ideal world, I'd like to be able to have a function of some kind where you can have inifinite levels, but not essential?
Any ideas peeps?
James