Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How do I add “about us” and “customer service” links to links.phtml? 
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Hello,

As it is now (by default), the “links” block has the “about us” and “customer service” links. The links.phtml creates the rest of the links - “site map”, “advanced search” etc.

How can I add the links from the links block to the links.phtml so they are all on one line and get rid of the links block? I have tried copying the code from the links block and pasting it into the links.phtml file, but that does not work. The links are then broken, as

{{store url=""}}customer-service

is not translated correctly.

Many thanks!

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

*bump* anyone? Please?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
hyteckit
Sr. Member
 
Avatar
Total Posts:  166
Joined:  2008-04-01
Los Angeles, CA
 

If you are using the modern theme, follow my solution on this thread.

http://www.magentocommerce.com/boards/viewthread/7327/

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

Hi,

I am actually using the modified default theme. Basically, what I need is to, instead of adding links to links.phtml as absolute links, to add them as relative. To do that, I tried, for example:

{{store url=""}}customer-service

but that does not work. Does anyone know how to call/define store url?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

where are you typing in that code -> “{{store url=""}}customer-service “

On a CMS page or in a php/phtml file?

edit: That’s probably a dumb question, if your post count is any measure of experience

edit again: Here is how it’s done on a CMS page in a store I’ve worked on:

<a href="{{store url=""}}upcoming"><span>See all upcoming events</span></a>
 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Hi,

Many thanks for that. Yes - that works in CMS pages, but I want to edit phtml file, and that does not work there.

Many thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

Sorry, I keep editing, so I’ll make a new post -

Since you are editing your PHTML file and not a CMS file, you cannot use the {{store url=""}} syntax! You need to use PHP!

should be as simple as this:

<a href="<?php echo $this->getUrl('path/to/page'); ?>" title="whatever">TEXT HERE</a>

if adding the text as a parameter to the getUrl function doesn’t work, do it like this:

<a href="<?php echo $this->getUrl(); ?>/path/to/page" title="whatever">TEXT HERE</a>
 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Hi,

Many thanks for your reply. Yes, that works - so it can look something like this:

<li><a href="<?php echo $this->getUrl('')?>"><?php echo $this->__('Home') ?></a></li>

However, when I add new links to the links.phtml, they appear on top (together with my account, my wishlist etc) as well as on bottom. I only want them on bottom. Any way around this? What decides which links are placed on top and which on bottom?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
OurWorldTalks
Member
 
Total Posts:  60
Joined:  2008-07-08
 

Hi lisali, I removed the links.phml via commenting out the portion of line 84 - 85 in page.xml file (v. 1.1.5) so that the Sitemap, Advanced Search… don’t show up. Then maybe you can create the links manually in the CMS footer static block.

 
Magento Community Magento Community
Magento Community
Magento Community
 
davidgrun
Sr. Member
 
Total Posts:  245
Joined:  2008-07-10
 

@nikefido

This works. the question is:  Supose I’m in URL http://www._________.com/international and I want to have a link on my header to http://www._________.com. Now setup the link like this href="<?php echo $this->getUrl(''); ?> it wil take me to http://www._________.com/international instead of http://www._________.com.

So, how do I link to the root without having to write the actual http://www._____.com?

Thanks!

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