I have top menu but i can't put home button in it..

here is code of mu top menu and what i try to do .

<?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
<?php if($_menu): ?>
<div class="nav-container">
    <ul id="nav">
        <?php echo $_menu ?>
        <li><a title="text1" href="{{store url=''}}"><span>Home</span></a></li>

<?php endif ?>

Do I need to enter something in

store url=''

2 Answers 2


First make sure that you are editing the right template.
if so change this:

<li><a title="text1" href="{{store url=''}}"><span>Home</span></a></li>

to This:

  <li><a title="text1" href="<?php echo Mage::getUrl('')?>"><span><?php echo $this->__('Home');?></span></a></li>  

There is a chance that the menu is not rendered by the template you are editing. For version 1.7+ the menu is handled differently.
More details on how to add cleanly items to the top menu can be found here

  • You were right. I have edited out the wrong template.. Thank you very much! :)) Feb 18, 2014 at 10:05
 1) {{store url=""}}

use this only in CMS page.

To get store url in phtml file

use the following code


To get controller page


TO get CMS page url

$this->getUrl('', array('_direct'=>'some-url-key')); //for cms pages

To pass parameter in url

$this->getUrl('module/controller/action', array('_query'=>'a=2&b=5')); 
$this->getUrl('', array('_direct'=>'some-url-key', '_query'=>'a=2&b=5'));

I have refer this answer

  • Thank you for your answer but i still have problem to show that button in menu.. :/ I tried this '$this->getUrl('', array('_direct'=>'home'));' and this '<li><a href="{{store url='home'}}">home</a></li>' .. but nothing happend..confused... Feb 18, 2014 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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