Layout code

<reference name="content">
            <block type="hello_world/sample" name="world.sample" template="hello/world/simple_page.phtml"/>

It does not render template file. But It does with block type="page/html"

What would be the problem. Is anybody here having solution?

My Block code that is in Hello/World/Block/Sample.php

class Hello_World_Block_Sample extends Mage_Core_Block_Template {

    function get_something(){
        return "hai";

1 Answer 1


According to your code ,your config.xml block code should be

    <hello_world> <!- block tye prefix -->

Please check.

  • Yes @Amit Bera, You are correct. Commented Mar 2, 2015 at 12:02
  • You are welcome
    – Amit Bera
    Commented Mar 2, 2015 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.