First open top.phtml file of your template. My path for this file is /public_html/app/design/frontend/default/hellostyle/template/catalog/navigation/top.phtml.
Now after this, Remove default menu code like this :
And Add this code here :
now your all cms page links will be displayed in top navigation in default magento(CE)
Now after this, Remove default menu code like this :
<?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
<?php if($_menu): ?>
<ul id="nav">
<?php echo $_menu ?>
</ul>
<?php endif ?>
And Add this code here :
<?php $collection =
Mage::getModel('cms/page')->getCollection()->addStoreFilter(Mage::app()->getStore()->getId());?>
<?php $collection->getSelect()
->where('is_active = 1'); ?>
<ul id="nav">
<?php foreach ($collection as $page): ?>
<?php $PageData = $page->getData(); ?>
<?php if($PageData['identifier']!='no-route' &&
$PageData['identifier']!='enable-cookies' &&
$PageData['identifier']!='home2') { ?>
<li>
<a href="/<?php echo
$PageData['identifier']?>"><span><?php echo
$PageData['title'] ?></span></a>
</li>
<?php } ?>
<?php endforeach; ?>
</ul>
now your all cms page links will be displayed in top navigation in default magento(CE)
No comments:
Post a Comment