I have a portfolio section of my site with a side-navigation. On the side navigation, I have it set to automatically drop-down a group section and highlight the item of the current page. Here is a link to see what I'm talking about: http://www.premieravdallas.com/portfolio/mcmillanjames.php
I was doing all of this with HTML/CSS, but I recently moved my side navigation to a separate PHP file to make it easier to add additional portfolio items. I wanted to keep the "drop-down" and "highlight" functions, so I added some PHP codes. Can someone take a look and tell me if it is correct. It is working, but I don't know if it is the correct way to do it.
In my "sidecontent_left.php" file:
<ul id="navlist">
<li class="tier1">
<a href="#" class="more"
onclick="Effect.toggle('restaurants', 'blind', {duration: 0.4}); return false;">
Restaurants</a>
</li>
<div class="tier2" id="restaurants" <?php if ($selectedgroup == "restaurants") {print 'style="display:block;"';} else {print 'style="display:none;"';} ?>>
<ul>
<li <?php if ($selecteditem == "mellowmushroom_frisco") print 'class="nav_store_current"' ?>><a href="/portfolio/mellowmushroom_frisco.php">Mellow Mushroom Frisco</a></li>
<li <?php if ($selecteditem == "mellowmushroom_mckinney") print 'class="nav_store_current"' ?>><a href="/portfolio/mellowmushroom_mckinney.php">Mellow Mushroom McKinney</a></li>
<li <?php if ($selecteditem == "mellowmushroom_southlake") print 'class="nav_store_current"' ?>><a href="/portfolio/mellowmushroom_southlake.php">Mellow Mushroom Southlake</a></li>
</ul>
</div><!-- End Tier2 -->
The the code in my Portfolio pages:
<?php
$selecteditem = "aftershocklondon";
$selectedgroup = "retail";
include "../global/php/sidecontent_left.php";
?>
thanks in advance**