i am trying to include a menu file into my main index page which inserts a css selector based on a variable set on the main page.
the menu code works fine when it is a part of the main index page, but if i strip it out and include it as "subnav_design.php" it stops working - the menu still shows up, but the css selector is not inserted
here is the content of the included file:
<div id="subnav">
<ul>
<li<?php if ($cat=="print")
echo " id=\"currentpage\""; ?>>
<a href="design/print/" title="print design portfolio">print</a></li>
<li<?php if ($cat=="web")
echo " id=\"currentpage\""; ?>>
<a href="design/web/" title="web design portfolio">web</a></li>
</ul>
</div>
this is the main page with the subnav embedded
this is the main page with the subnav included
i'm sure there is something obvious that i'm missing, but i'm not familiar enough with php to spot it. any help would be greatly appreciated.
thanks,
nat