Hey Guys,
I was wondering if you might be able to lend me a quick hand with this problem.
I have a navigation menu that uses the following code to highlight the current page
<li <?php if (strpos($_SERVER['PHP_SELF'], 'press.php')) echo 'value="1"';?>>
But I am using htaccess rewrite rules to format variables being passed to my product gallery. So item.php?id=12 is changed to /item/112/products.php, for example.
But any page where these rewrite rules are in place, the navigation menu does not highlight the selected page. Whether I use;
<li <?php if (strpos($_SERVER['PHP_SELF'], 'products.php')) echo 'value="1"';?>>
or
<li <?php if (strpos($_SERVER['PHP_SELF'], 'item.php')) echo 'value="1"';?>>
Any ideas?
Thanks in advance for any help,