bonmane Posted February 24, 2011 Share Posted February 24, 2011 I added <?php $_menu = ''?> <?php foreach ($this->getStoreCategories() as $_category): ?> <?php $_menu .= $this->drawItem($_category) ?> <?php endforeach ?> <?php if ($_menu): ?> <div class="nav-container"> <ul id="nav"> <li class="level0 first nav-home"><a href="<?php echo $this->getUrl() ?>"><span><?php echo $this->__('Home') ?></span></a></li> <?php echo $_menu; ?> <li class="level0 nav-1 parent"><a href="<?php echo $this->getUrl('contacts')?>"><span><?php echo $this->__('Contact') ?></span></a></li> <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('menu')->toHtml() ?> </ul> </div> <?php endif; ?> to top.phtml and it works as expected, I now have CMS links in my nav but how can I make them have active state like the category links do?? here is the site: http://pro-tools-training.com/new-magento/index.php/video-1.html Link to comment https://forums.phpfreaks.com/topic/228703-add-active-state-to-nav/ Share on other sites More sharing options...
ChemicalBliss Posted February 24, 2011 Share Posted February 24, 2011 What category links? Seems fine to me on the site, just the drop-downs aren't created and i cannot see any "category links". Im guessing it's to do with your CSS though if by "active state" you mean "Style for an 'Active' link". Link to comment https://forums.phpfreaks.com/topic/228703-add-active-state-to-nav/#findComment-1179221 Share on other sites More sharing options...
bonmane Posted February 25, 2011 Author Share Posted February 25, 2011 the nav has 3 links 1. home 2. Documentaries & Courses 3. Contact click on Documentaries & Courses > once the page loads the link holds an active state as expected click on either home or contact > once the page loads the link does not hold an active state home and contact were added by me and therefore do not have the built in behavior that Documentaries & Courses has - because Documentaries & Courses is part of the default system navigation. ' I added the new links and now want to add the active state behavior. Link to comment https://forums.phpfreaks.com/topic/228703-add-active-state-to-nav/#findComment-1179332 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.