I am using a menu on my site that uses html (unordered list - <ul>)
I am using a PHP include file (I've called menu.php) so that i do not have to re-edit the menu manually on each page every time i decide to add or change a menu item.
However, in the html porton of the code I need to insert an id tag (i have named "original") to identify which sub item sits open on a particular page eg. on offtravel.html, on the unordered list needs to look like this in the html;
<li id="original"><a href="../en/offtravel.html">Travel insurance</a></li>
so currently there are about 30 pages, 29 <li> tags and 1 <li id ="original"> tag, which needs to move up and down the code depending on which page is live.
given that I need this tag to appear in a different <li> on each page within its appropriate <li> tag, how can I write the include menu.php to perform this task for each page as it loads so that the correct level of menu sits open?
Here is the first portion of the html code that I have pulled into the include file.
<li><a href="#">Financial Controlling</a>
<li><a href="#">Cash controlling</a>
<li id="original"><a href="../en/budfor.html">Budgets and Forecasts</a></li>
<li><a href="../en/monper.html">Monitoring performance</a></li>
<li><a href="#">Other controls</a>
<li><a href="../en/finind.html">Financial indicators</a></li>
<li><a href="../en/nonfin.html">Non Financial</a></li>
<li><a href="../en/marper.html">Market performance</a></li>
No replies to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users