Hi all,
Firstly I am new to the PHP Builder forums, so hello and I hope you are all well.
In short, I am simply making my navigation into a standard PHP include. I have completed this step successfully. Where I am struggling is with highlighting the current page/section in the navigation. This is what I have coded:
On the Main pages:
<?php define('page_name', 'servers'); ?>
On the Navigation Include:
class="<?php echo page_name == 'servers' ? 'top_link_highlighted' : 'top_link'; ?>"
So basically I am trying to swap the defined class from 'top_link' to 'top_link_highlighted' if the current page is called 'servers'. The trouble is that it is using the top_link class when it should be using the top_link_highlighted class on the relevenat page/section.
Any help would be gratefully received as I don't seem to be making any progress!
Kind regards,
Matthew