frankd
5/4/2015 - 6:45 PM

Dynamic Navigation Menu Links

Dynamic Navigation Menu Links

header .nav li.on {
  color:green;
  background: bla bla bla;
}
// *** INSIDE EACH INDIVIDUAL PAGE *** //

$section = "home"; // goes inside of the Home page
$section = "about"; // goes inside of the About page
$section = "contact"; // goes inside of the Contact page


<!-- NAVIGATION MENU li-->
<ul>
  <li class"<?php if($section == "home") { echo "on"; } ">Home</li>
  <li class"<?php if($section == "about") { echo "on"; } ">About</li>
  <li class"<?php if($section == "contact") { echo "on"; } ">Contact</li>
</ul>