Magento – Integrate CMS Pages and Others to the Main Menu

catalogcmsmagento-communitynavigation

I think this is a quite common problem: There are normal products categories but also some additional CMS pages which could be included in the main shop navigation.

In some shops I have seen the solution, that content was put in a CMS block and the category switched to "display only CMS" block to resemble a navigation for the shop content.

But I do not think that this is a best practice.

Are there better workarounds in Community Edition? (I know there is a Enterprise Edition feature to do this).

Or is there a well-known open source module helping with that?

Best Answer

Starting with Magento CE 1.7 there is this event available page_block_html_topmenu_gethtml_before that allows you to add any items to the top menu.
For example it is used to add the categories to top menu in Mage_Catalog_Model_Observer::addCatalogToTopmenuItems().
The only constraint is that your top menu block should look like this in page.xml

<block type="core/text_list" name="top.menu" as="topMenu" translate="label">
    <label>Navigation Bar</label>
    <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
</block> 

If your theme is somehow similar with the default theme for 1.7 you should be able to add links to the top menu using this event.
Note: in 1.7 the top menu is rendered by this template: page/html/topmenu.phtml.