2. Create template file app/design/frontend/Tatva/default/template/helloworld/helloworld.phtml and write down
N.B: Use default instead of Tatva as template location if you use default design packages. Means create file in app/design/frontend/default/default/template/helloworld/helloworld.phtml
Hello World ! I am a Magento Guy..
Hey, new module is ready to run and hit browser with url

http://127.0.0.1/projectname/index.php/helloworld/

Kate Scott

06-02-2011, 08:19 AM

After reading through everything I can find I’ve nearly been able to create a simple custom module as per the tutorials/threads etc, the one thing that isn’t working is the layout xml for the module, it seems to be completely ignored - I think I’m missing something so basic no one every posts it, every thread related to this topic seems to end with “oh I’ve got it working now” and no final explanation wink
Hopefully someone can help clear this up for me!
To strip it back to complete basics I’m trying to create a Hello World block in a custom module which is displayed in whatever the current theme is.

This works but here’s where I get lost - what I don’t understand is why I can’t seem to create a new layout xml file for this module, I can’t seem to get the syntax right.

From all the other threads this seems to be the ‘right thing to do’ and I thought I should be able to avoid modifying the default/layout/catalog.xml and instead create a default/layout/hello.xml file like this:
<layout version="0.1.0">
<hello_index_index>
<reference name="product.info">
<block type="hello/view" name="Mycompany.hello.block" as="hello_block" template="Mycompany/hello.phtml" />
</reference>
</hello_index_index>
</layout>

I’ve tried <hello>, <hello_index>, <hello_index_index> and even breaking the xml <he llo> to force an error, but the file doesn’t appear to be read at all. Have I just got the filename wrong or am I barking up the wrong tree?

I’m sure this is a really, really, simple mistake but I’m stumped!

Based on your layout handle <hello_index_index> You are missing the controller:

thanx for sharing nice information with us i strongly believe it is helpful for me and my other forum friends who want to more information about this topic.

alexmorco

09-26-2018, 07:30 AM

Customizing module with Magento layout XML (https://www.cloudways.com/blog/customize-magento-modules-through-layout-xml-files/) file is very easy, you can add custom titles, meta tags, keywords or a description of your Magento module page. You can easily add this custom information to all existing, core or newly created modules.