Magento Forum

   
Adding a menu of CMS Pages to Top Navigation
 
jwade
Jr. Member
 
Total Posts:  1
Joined:  2011-08-30
 

I am using Magento 1.5, and I am fairly new to Magento, but I have a lot of experience with PHP. 

I want to add another menu to the top navigation that contains links to all of the CMS pages that I have created on the site.  I have found many forum posts on this topic, and I\’ve tried them all, but none of them work for me. 

This post works, but I would have to manually create all of the links in the sub menu.  I would rather get the list through the APIs.
http://www.magentocommerce.com/boards/viewreply/225353/

I couldn\’t get anything to display with any of these suggestions:
http://www.magentocommerce.com/boards/&/viewthread/225107/

This one didn\’t work either:
http://www.magentocommerce.com/boards/viewthread/24881/#t82643

Can anyone help me out here?

Thanks in advance,
~ j.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kdtips
Member
 
Avatar
Total Posts:  73
Joined:  2011-08-13
Auckland New Zealand
 

So Are you trying to do all Automatically?

or you just want to link few pages only?

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Moderator
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

1> Get all the CMS pages dynamically as:

<?php 
$cmsMenu 
'';
$cmsPages Mage::getModel('cms/page')->getCollection(); 
foreach(
$cmsPages as $cmsPage): 
    
$page $cmsPage->getData();  
    if(
$page['identifier'== "no-route" || $page['is_active'== "0" || $page['identifier'== "enable-cookies")
        
    } 
else 
        $cmsMenu 
.= '<li><a href="'.$page['identifier'].'" title="'.$page['title'].'">'.$page['title'].'</a></li>'
    
}  
endforeach; 
?>
2> echo the $cmsMenu in app/design/frontend/[interface]/[theme]/template/catalog/navigation/top.phtml somewhere
<ul id="nav">
<?php //echo $cmsMenu; ?>
        
<?php echo $_menu ?>
<?php 
echo $cmsMenu?>
    
</ul>

Hope this helps.
Cheers!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
soy_de_madrid
Member
 
Total Posts:  51
Joined:  2008-09-30
 

Hi can anyone please also help me with this. I only want to show a few static cms pages in the top nav along with the categories, but is there a way I can edit the phml files or xml etc so that it calls into the nav bar a static block with the links in.

That way, once in place I can add and remove links in the static block from the backend without having to edit or disturb the template files further.

If pages change names or are added or removed I want it easier to update using the backend. Does anyone know how to do this, I’m also new to Magento.

Thanks for any help, I’m using version 1.6.

 
Magento Community Magento Community
Magento Community
Magento Community
 
G_Mehta
Guru
 
Avatar
Total Posts:  418
Joined:  2010-01-27
India
 

Have a look on my blog for the same. Show CMS Pages into navigation menu

Cheers!

 
Magento Community Magento Community
Magento Community
Magento Community
 
magebay
Sr. Member
 
Avatar
Total Posts:  122
Joined:  2012-10-09
Thai Nguyen
 

MenuCreatorPro.com is the most popular Menu Manager System for Magento. You can easy solved any problem related to menu or navigation of your magento store. Check demo link below:
http://www.menucreatorpro.com/livedemo/index.php/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top