2

Layout code

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

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";
    }
}
0

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

<global>
...
<blocks>
    <hello_world> <!- block tye prefix -->
        <class>Hello_World_Block</class>
    <hello_world>
<blocks>
..
</global>

Please check.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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