I have this menu structure:
<li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
I want to be able to generate it from my current table structure:
sequence
page_title
page_url
parent
In the above structure, parent will equal sequence so for all top levels, my query would include WHERE parent = '' then all child items, the query would include: WHERE parent = '[SEQUENCE]'.