pepe_lepew1962
11-10-2013, 10:24 PM
Hello:
I am trying to create templates for my files and I am having a problem with getting the menu to work properly. I have 3 template files, head.php, main.php and foot.php. The head.php contains the following menu html:
<li><a href="www.one.com" class="<?php echo "$head001";?>">One</a></li>
<li><a href="www.two.com" class="<?php echo "$head002";?>">Two</a></li>
<li><a href="www.thr.com" class="<?php echo "$head003";?>">Three</a></li>
<li><a href="www.fou.com" class=<?php echo "$head004";?>>Four</a></li>
<li><a href="www.fiv.com" class="<?php echo "$head005";?>">Five</a></li>
In the main.php, I would like to have 1 variable for what the status of the menu is for that page. For example when the person is on page 3, the class should be current.
$head003 = "Current";
The variable current is in my external css file and changes the appearance. Simple, but for some reason, the variable is not being carrier over. Can you please help.
I am trying to create templates for my files and I am having a problem with getting the menu to work properly. I have 3 template files, head.php, main.php and foot.php. The head.php contains the following menu html:
<li><a href="www.one.com" class="<?php echo "$head001";?>">One</a></li>
<li><a href="www.two.com" class="<?php echo "$head002";?>">Two</a></li>
<li><a href="www.thr.com" class="<?php echo "$head003";?>">Three</a></li>
<li><a href="www.fou.com" class=<?php echo "$head004";?>>Four</a></li>
<li><a href="www.fiv.com" class="<?php echo "$head005";?>">Five</a></li>
In the main.php, I would like to have 1 variable for what the status of the menu is for that page. For example when the person is on page 3, the class should be current.
$head003 = "Current";
The variable current is in my external css file and changes the appearance. Simple, but for some reason, the variable is not being carrier over. Can you please help.