Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8978985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:44:20+00:00 2026-06-15T19:44:20+00:00

In my theme I already use (in local.xml): <reference name=top.links> <action method=setTemplate><template>page/html/header/links.phtml</template></action> </reference> Now

  • 0

In my theme I already use (in local.xml):

<reference name="top.links">
    <action method="setTemplate"><template>page/html/header/links.phtml</template></action>
</reference>

Now I’m making a module where I want to change the template, hence making the module installable without any needs to modify the theme.
So almost same code from a module xml-file:

<reference name="top.links">
    <action method="setTemplate"><template>sociallogin/header/links.phtml</template></action>
</reference>

Magento always pick the first one in local.xml
How can I override this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:44:22+00:00Added an answer on June 15, 2026 at 7:44 pm

    You shouldn’t (although I’ll give you some possible ideas at the end of this post). Magento is designed such that code in local.xml “wins” over code in an installable module file. The basic idea is local.xml is where a store owner goes to add layout updates that override module file updates. This is How The System Works™ and changing it would create more chaos than it would solve.

    That said, you might be able to work within the system if you put your code in a different layout handle. Handles are the node that surround the layout updates

    <default>
        ...   
    </default>
    
    <catalog_category_view>
    </catalog_category_view>
    
    <customer_logged_out>
    </customer_logged_out>
    
    etc...
    

    The way Magento’s layout system works is:

    • all the updates in the default tag are run from module files, and then from local.xml.
    • Then all the updates from catalog_category_view are run from module files, and then from local.xml.
    • Then all the updates from customer_logged_out are run from module files, and then from local.xml.

    That is, there’s a handle order/specificity. Checkout the Layout tab of the Commerce Bug Demo store (after clicking debug) to see the handle order for a page. (disclaimer: Commerce Bug is a product I created and sell)

    So, if your local.xml file applied its updates in default and you really can’t rejigger this, then you could apply your module updates in a handle that came later.

    Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there is already some property that I could use such as: if (this.IsDialog)
Is there a GWT Date Time Component? Note: I am already making use of
Is there anyone who has already tried to use the Microsoft Bing translator web
I already know that most implementations use a single thread, but is there anything
Is there any apt-get -like program for use with Cygwin? I've already tried cyg-apt
Let's suppose I have all of these already provided: The name of a table
Is there a way to use my SOAP web service(spring-ws, java) as a XML
I am trying to use compass with Drupal 7, Basic theme and Compass module
<!DOCTYPE html> <html> <head> <meta name=viewport content=width=device-width, initial-scale=1> <link rel=stylesheet href=http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css /> <script src=http://code.jquery.com/jquery-1.6.4.min.js></script>
On my local development machine (php 5.3.14) I can use a class like this:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.