Ok everyone. I'm trying to get my css menu to show an active state for just 3 pages. I can do this with a normal html site, but the php dynamic is throwing me off. I'm already using a body class for the intro page. Thoughts?
Test Server:
http://geaux.cthree.cc
I can post the css if needed.
Thanks
Chris
Test Server:
http://geaux.cthree.cc
I can post the css if needed.
Thanks
Chris
You could do it by getting the product id from the $_GET variable. If 58 then activate the Pickup. If 59 then activate Drop off. If none then activate Home.
Code: Select all
<div id="nav">
<ul class="page-menu">
<li class="hometab <?php echo (!isset($_GET['product_id'])) ? 'current_page_item' : '' ?>"><a href="http://geaux.cthree.cc/index.php?route=common/home">Home</a></li>
<li class="page_item page-item-20 <?php echo (isset($_GET['product_id']) && $_GET['product_id'] == '58') ? 'current_page_item' : '' ?>"><a href="http://geaux.cthree.cc/index.php?route=product/product&path=35&product_id=58">Add A Pick Up</a></li>
<li class="page_item page-item-20 <?php echo (isset($_GET['product_id']) && $_GET['product_id'] == '59') ? 'current_page_item' : '' ?>"><a href="http://geaux.cthree.cc/index.php?route=product/product&path=35&product_id=59">Add A Drop Off</a></li>
</ul>
</div>
Qphoria,
Hey, I've implemented the seo url as suggested. I need a little help adjusted the live menu state again. I was trying 'keyword' in the above code's place, but really am guessing and not succeding. Could you shed some light on it for me please?
If keyword is the right route, then the 2 options are "pickup" & "dropoff".
new link:http://www.geauxgetit.com
Thanks.
Hey, I've implemented the seo url as suggested. I need a little help adjusted the live menu state again. I was trying 'keyword' in the above code's place, but really am guessing and not succeding. Could you shed some light on it for me please?
If keyword is the right route, then the 2 options are "pickup" & "dropoff".
new link:http://www.geauxgetit.com
Thanks.
I see there's a 'url_alias_id' in the database. It's integer based so I should be able to swap the 'product_id' with "url_alias_id' right? Plus swap the appropriate digits (and update the urls)?
Code: Select all
<div class="div4">
<div id="nav">
<ul class="page-menu">
<li class="hometab <?php echo (!isset($_GET['product_id'])) ? 'current_page_item' : '' ?>"><a href="http://geauxgetit.com/index.php?route=common/home">Home</a></li>
<li class="page_item page-item-20 <?php echo (isset($_GET['product_id']) && $_GET['product_id'] == '53') ? 'current_page_item' : '' ?>"><a href="http://geauxgetit.com/individual/pickup">Add A Pick Up</a></li>
<li class="page_item page-item-20 <?php echo (isset($_GET['product_id']) && $_GET['product_id'] == '50') ? 'current_page_item' : '' ?>"><a href="http://geauxgetit.com/individual/dropoff">Add A Drop Off</a></li>
</ul>
</div>
Who is online
Users browsing this forum: No registered users and 4 guests