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 3397744
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:33:55+00:00 2026-05-18T04:33:55+00:00

I am trying to create a new custom module in magento but the layout

  • 0

I am trying to create a new custom module in magento but the layout is not loading. It always load three column layout which is defined as a default in page.xml file. I think it is not considering the layout set for my module action even if it is mentioned in the config.xml file like this-

<frontend>
        <routers>
            <mynamespace_test>
                <use>standard</use>
                <args>
                    <module>Mynamespace_Test</module>
                    <frontName>test</frontName>
                </args>
            </mynamespace_test>
        </routers>  
  <layout>
          <updates>
              <test><file>test.xml</file></test>
          </updates>
      </layout>
    </frontend>

and my test.xml looks like this:-

<?xml version="1.0"?>
<layout version="0.1.0">
    <test_index_index translate="label">
        <label>Test module</label>
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        </reference>     
        <reference name="content">
            <block type="test/this" name="test.this" template="test/test.phtml" />
        </reference>
    </test_index_index>
</layout>

and my controller is defined like this:-

class mynamespace_Test_IndexController extends Mage_Core_Controller_Front_Action
{
 function indexAction()
 {
  $this->loadLayout();
        $this->renderLayout();
 }

}

Please help! what I am missing.
Thanks

  • 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-05-18T04:33:55+00:00Added an answer on May 18, 2026 at 4:33 am

    Yes, I got it working. I understood the problem is not there with layout file after pointing the layout file of some other module. The thing is wrong with this is mentioning namespace while defining router for module:

    I updated this block of code:-

    <routers>
                <mynamespace_test>
                    <use>standard</use>
                    <args>
                        <module>Mynamespace_Test</module>
                        <frontName>test</frontName>
                    </args>
                </mynamespace_test>
            </routers>  
    

    to

    <routers>
                <test>
                    <use>standard</use>
                    <args>
                        <module>Mynamespace_Test</module>
                        <frontName>test</frontName>
                    </args>
                </test>
            </routers> 
    

    and it worked fine.

    Thanks.

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

Sidebar

Related Questions

I have been trying to create a new google custom search engine, but when
I am trying to create a custom module in magento admin. I have reached
I am trying to create a new custom validation in which I can compare
I'm trying to create a new list of a custom content type following this
Help, I'm trying to create a new post in my wordpress blog with custom
I am trying to create a new project but it getting following error .
I'm trying to create a new Excel file using jxl, but am having a
I am trying to create a WiX custom action which will allow me to
What I'm trying to do is create a new custom data type that behaves
I'm trying to create a a custom post method but i'm having trouble finding

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.