Magento Forum

Add Home Link to Menu Bar: how does it work
 
Jumentfolle
Member
 
Total Posts:  40
Joined:  2008-03-06
 

Hello,
I’m a bloody newbie in this, so first of all I apologise for annoying you with something so simple…

A few minutes ago, I applied this how to, and it worked perfectly.
Then, I tried to tried to take the same code and to use it to add a link to another page than the “Home” one.

I did it like this:

<!-- BLOG BUTTON HACK -->
<
li><a href="<?php echo $this->getUrl('')?>"><?php echo $this->__('Blog'?></a></li>
<!-- 
BLOG BUTTON HACK -->

and of course, it doesn’t worked like I wanted it to. I have no a link called “Blog”, but it goes to “Home” too.

So, can someone really nice explain me where I have to go to link

php echo $this->__('Blog')
with my url?

Thanks a lot,
Sarah (France)

 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Hi,

First you need to create a page called Blog in CMS>>Manage Pages>>Add new page

Then use the code that you have, but with the following tweak:

<!-- BLOG BUTTON HACK -->
<li><a href="<?php echo $this->getUrl('Blog')?>"><?php echo $this->__('Blog') ?></a></li>
<!-- BLOG BUTTON HACK -->

Let us know if this works!
Lisa
smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Yoke Lee
Sr. Member
 
Avatar
Total Posts:  80
Joined:  2008-05-08
China - Singapore
 

Ohh…

i thought it’s done by {{block type=.... template= ... }}

is it not?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top