- Hello friends finally I find the solution for add static page link to main menu in magento CMS,
- First find the top.phtml file from this page: app/design/frontend/default/YourThemeName/template/catalog/navigation/top.phtml
- Before do any changes on this file please take copy of orignal top.phtml file,
- Below is default code of top.phtml file:
- First find the top.phtml file from this page: app/design/frontend/default/YourThemeName/template/catalog/navigation/top.phtml
- Before do any changes on this file please take copy of orignal top.phtml file,
- Below is default code of top.phtml file:
<?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
<?php if($_menu): ?>
<div class="nav-container">
<ul id="nav">
<?php echo $_menu ?>
</ul>
</div>
<?php endif ?>
- You shoud modified as per below example where I add Home link:
<?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
<?php if($_menu): ?>
<div class="nav-container">
<ul id="nav">
<li><a href="/">Home</a><li>
<?php echo $_menu ?>
</ul>
</div>
<?php endif ?>
- Or you should also add and magento block shord code (In block you define static menu link in <ul><li> format):
<?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
<?php if($_menu): ?>
<div class="nav-container">
<ul id="nav">
<li><a href="/">Home</a><li>
<?php echo $_menu ?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('navbar_links')->toHtml() ?>
</ul>
</div>
<?php endif ?>
- In above example 'navbar_links' is block identifier name.
Enjoy!
I have read your blog its very attractive and impressive. I like it your blog.
ReplyDeletePHP 7 Training in chennai | PHP 7 Training Course
PHP 7 Training in chennai | Online PHP 7 Course
Nice blog! Thank you for sharing this.
ReplyDeleteMobile App Development Company in Kochi