I have a phtml template that I'd like to add the CMS nav menu to. The page is added through the hierarchy but when clicked it renders without the CMS navigation on the left side (the page is using the 2 column-left template). The others are standard CMS Pages created through the Admin so they work fine.

Does anyone know where I can find the block to add to local.xml? Everywhere I've looked on the internet is about how to add a page to CMS, not add the CMS component to the page. Any help would be greatly appreciated. Thanks!

1 Answer 1


Do you want to show cms links on the left side bar? if yes do this:

create page cms-nav.phtml in yourtemplate/template/cms

<div class="CmsNav">
  <?php $collection = Mage::getModel('cms/page')->getCollection()->addStoreFilter(Mage::app()->getStore()->getId());?>
  <?php  $collection->getSelect()
    ->where('is_active = 1')
    ->order('main_table.sort_order ASC'); ?>
    <?php foreach ($collection as $page): ?>
      <?php $PageData = $page->getData(); ?>
      <?php if($PageData['identifier']!='no-route') : ?>
      <li <?php if(Mage::getSingleton('cms/page')->getIdentifier()  ==  $PageData['identifier']): echo 'class="active"'; endif; ?>>
        <a href="<?php echo $this->getBaseUrl() . $PageData['identifier']?>" title="<?php echo $PageData['title'] ?>"><?php echo $PageData['title'] ?></a>
      <?php endif ?>
    <?php endforeach; ?>


In your local.xml add this :

        <reference name="content">
            <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
        <reference name="left">
            <block type="core/template" as="cms-nav" name="cms-nav" template="cms/cms-nav.phtml"/>


This code will create a list on the left side bar for all the CMS pages on your site.

  • The left part didn't work but it got the menu on the page. I can work from here. Thank you!
    – dshamis317
    Oct 14, 2014 at 14:00
  • Worked fine here. Apr 4, 2017 at 1:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.