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 To move toplinks
 
tapebrothers
Sr. Member
 
Total Posts:  96
Joined:  2008-05-14
 

Could Someone please help?  I have tried everything and can not get the top.links to move were i want them.
I would like to move them under the nav bar in the center of the page.

Thank You shock

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nobby
Jr. Member
 
Total Posts:  22
Joined:  2008-06-23
 

you need to move the reference to the top.links in the page.xml in the layout directory of your theme

for the default theme it would be in app/frontend/default/default/layout/page.xml

if you move this block into the content block you can then use the relevant css to move it around and style it.

you should look for:-

<block type="page/html_header" name="header" as="header">
                <
block type="page/template_links" name="top.links" as="topLinks"/>
                <
block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
                <
block type="core/text_list" name="top.menu" as="topMenu"/>
            </
block>

and change to:-

<block type="page/html_header" name="header" as="header">
                <!-- <
block type="page/template_links" name="top.links" as="topLinks"/> -->
                <
block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
                <
block type="core/text_list" name="top.menu" as="topMenu"/>
            </
block>

then look for:-

<block type="core/text_list" name="content" as="content"/>

and change to:-

<block type="core/text_list" name="content" as="content">
                          <
block type="page/template_links" name="top.links" as="topLinks"/>
            </
block>

hope this helps

 
Magento Community Magento Community
Magento Community
Magento Community
 
tapebrothers
Sr. Member
 
Total Posts:  96
Joined:  2008-05-14
 

Thank you for the help but its not showing! Do i need to move this line of code <?php echo $this->getChildHtml('topLinks') ?> from header.phtml to somewhere:?

Thank you shock
still trying to get the hang of this

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nobby
Jr. Member
 
Total Posts:  22
Joined:  2008-06-23
 

Yes, you need to move it from the header.phtml to all the layout files you use (1column.phtml,2columns-left.phtml,2columns-right.phtml,etc...)

You will need to insert it between the

<?php echo $this->getChildHtml('global_messages'?>

and

<?php echo $this->getChildHtml('content'?>

This should ensure it appears on all pages.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nuranto
Member
 
Total Posts:  35
Joined:  2008-09-30
 

Hi!

I want to do almost the same. But instead of moving it to the content part, i want to move it on the categories bar (top.menu).

I did that :

<block type="page/html_header" name="header" as="header">
                <
block type="core/text_list" name="top.menu" as="topMenu"/>        
                <
block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
                <
block type="page/template_links" name="top.links" as="topLinks"/>
            </
block>

replaced by

<block type="page/html_header" name="header" as="header">
                <
block type="core/text_list" name="top.menu" as="topMenu">
                       <
block type="page/template_links" name="top.links" as="topLinks"/>
                   </
block>
                <
block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
            </
block>

and moved

<?php echo $this->getChildHtml('topLinks'?>
from header.phtml to top.phtml

But it doesn’t work ?! I don’t understand why ? (I am a new user!)

Added to that, i don’t really understand this system :
Why

<block type="page/html_header" name="header" as="header">
Why not :
<block type="page/html_header" name="header" as="header" template="page/html/header.phtml">]

And why there isn’t any <reference> to header ?

I read a lot of documentation, but didn’t find answers to those questions, maybe because of my limited english?

Thank you for your answers

 
Magento Community Magento Community
Magento Community
Magento Community
 
Roy Andre
Sr. Member
 
Avatar
Total Posts:  209
Joined:  2007-08-31
 

Hi guys,

Here is a very easy way of solving the issue you all seems to be encountering. Not many knows about the getLayout-function, but if you want to use - lets say - the links.phtml-template somewhere, just include it anywhere you want like this:

<?=$this->getLayout()->getBlock('top.links')->toHtml()?>

It should then include the links.phtml-file in your template-file.

 
Magento Community Magento Community
Magento Community
Magento Community
 
earthlytreasures
Jr. Member
 
Total Posts:  12
Joined:  2008-10-20
 

Hi,

I’m also trying to do this - move them below the nav roughly in line with the breadcrumb, to the right of the page. I tried changing the page.xml and column.phtml files as above but the links aren’t appearing. Any ideas? I’m afraid I don’t understand the last contribution above enough to use it…

Thanks,
Z

 
Magento Community Magento Community
Magento Community
Magento Community
 
sljacome
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2008-10-07
Mexico City
 
aFFi - 18 October 2008 11:57 PM

Hi guys,

Here is a very easy way of solving the issue you all seems to be encountering. Not many knows about the getLayout-function, but if you want to use - lets say - the links.phtml-template somewhere, just include it anywhere you want like this:

<?=$this->getLayout()->getBlock('top.links')->toHtml()?>

It should then include the links.phtml-file in your template-file.

Thanks a lot! this simple code did the trick!

 
Magento Community Magento Community
Magento Community
Magento Community
 
homebrewtj
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2008-10-04
 
MagentoJoe - 18 October 2008 11:57 PM

Hi guys,

Here is a very easy way of solving the issue you all seems to be encountering. Not many knows about the getLayout-function, but if you want to use - lets say - the links.phtml-template somewhere, just include it anywhere you want like this:

<?=$this->getLayout()->getBlock('top.links')->toHtml()?>

It should then include the links.phtml-file in your template-file.

Excellent- worked like a charm!

 
Magento Community Magento Community
Magento Community
Magento Community
 
fourroses
Sr. Member
 
Total Posts:  125
Joined:  2009-08-19
 

Got it working, only looking for the top.links.phtml file atm, when i chage it into /page/html/top.links.phtml then nothing changes.

 
Magento Community Magento Community
Magento Community
Magento Community
 
TomC
Sr. Member
 
Total Posts:  191
Joined:  2007-12-01
 
Roy Andre - 18 October 2008 11:57 PM

Hi guys,

Here is a very easy way of solving the issue you all seems to be encountering. Not many knows about the getLayout-function, but if you want to use - lets say - the links.phtml-template somewhere, just include it anywhere you want like this:

<?=$this->getLayout()->getBlock('top.links')->toHtml()?>

It should then include the links.phtml-file in your template-file.

If I want the links at the top of my page, into what file and where would I insert the code ??

 
Magento Community Magento Community
Magento Community
Magento Community
 
usauggs
Jr. Member
 
Total Posts:  26
Joined:  2009-08-23
 

Roy Andre, you save my life. Thanks a lot.

i ‘m so happy to finally found this post. i’m try to move the footer links to topMenu, but can not find how to add them to the top.html,

Thanks again, roy. smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mala17
Jr. Member
 
Total Posts:  16
Joined:  2009-02-04
 

Yeah, saved me too ... Although, isn’t there a error :<?= ?

Again, Magento should have better documentation, at least for these important or frequently used functions and features ...

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageBright
Sr. Member
 
Avatar
Total Posts:  100
Joined:  2011-11-21
 

Hi
Please Check Magento Extension

http://www.magebright.com/

Thank You

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mirasvit
Guru
 
Avatar
Total Posts:  639
Joined:  2009-08-22
 

Hello,

As the matter of fact the current menu system of Magento is not very convenient. It does not allow you to change the menu structure, add the own links or change the markup.
Consider the Menu Manager Pro. This extension simplifies the creation of menus of different types with different structure significantly.

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