Currently for my projects I create the navigation for each page manually and it looks something similar to:
<nav> <ul id="mainMenu"><!--Main Menu--> <li><a class="active" href="index.php">Home</a></li> <li><a href="contact.php">Contact</a></li> </ul> </nav> This works fine, however for projects that has many many pages it is not a really good practice or even efficient to do it manually. So I was wondering if there is anyone who can direct me to the right path and advice me on how to make my navigation dynamic? I know about PHP include and the .inc files - they are good. BUT I want to add class .active to the <a> of the page that is currently open. How can I do that?
BTW: I don't know if this s the right place to post this sort of questions here, but the moderator told me to post it here.