Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to create custom block in module? 
 
mikeyao
Jr. Member
 
Total Posts:  17
Joined:  2008-08-21
 

I’m going to create a slideshow on frontpage. I have done image upload on admin backend. I will create new block, but i don’t know kinds of the block types like ‘core/template’, ‘page/html’ etc and which block type should i use? If I need to create new block type, how to do it? I have tried, but the block isn’t worked.
config.xml:

<blocks>
        <
frontpage>
            <class>
Mage_FrontpageSlideshow_Block</class>
        </
frontpage>
    </
blocks>

use block

<block type="frontpage/slideshow" name="slideshow" template="frontpage/slideshow.phtml">
   <
action method="setTemplate"><template>frontpage/slideshow.phtml</template></action>
</
block>
 
Magento Community Magento Community
Magento Community
Magento Community
 
supportfree
Jr. Member
 
Total Posts:  8
Joined:  2009-05-23
 

Try this: http://demo.hello-magento.com/freecms/electronics.html
------

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top