Post by cclaud3 » Thu Sep 10, 2009 9:59 am

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

New member

Posts

Joined
Tue Aug 04, 2009 4:49 am

Post by Qphoria » Thu Sep 10, 2009 10:47 am

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>

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by cclaud3 » Thu Sep 10, 2009 10:59 am

Thank Yoooouuuu!

Check your Paypal! ;)

New member

Posts

Joined
Tue Aug 04, 2009 4:49 am

Post by Qphoria » Thu Sep 10, 2009 11:20 am

Thank you :)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Leon » Fri Sep 11, 2009 6:17 am

OT:
cclaud3, i really like what you've done with your site. there's a couple of problems, such as the footer not always being at the bottom, but i am sure you will sort that out.

nice site mate.

Active Member

Posts

Joined
Tue Apr 07, 2009 1:20 am

Post by cclaud3 » Fri Sep 11, 2009 6:46 am

Thanks.

Yeah, I'm still moving things around and it's not validated yet. Hopefully soon.

New member

Posts

Joined
Tue Aug 04, 2009 4:49 am

Post by cclaud3 » Wed Oct 21, 2009 3:16 am

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.

New member

Posts

Joined
Tue Aug 04, 2009 4:49 am

Post by cclaud3 » Wed Oct 21, 2009 9:33 am

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>   

New member

Posts

Joined
Tue Aug 04, 2009 4:49 am

Post by Qphoria » Wed Oct 21, 2009 9:58 am

try changing "$_GET" to "$this->request->get"

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by cclaud3 » Wed Oct 21, 2009 11:06 am

Thank you!

New member

Posts

Joined
Tue Aug 04, 2009 4:49 am
Who is online

Users browsing this forum: No registered users and 4 guests