Skip to main content
Formating / Tagging
Source Link
Alex
  • 14k
  • 19
  • 83
  • 167

Magento Custom Debugging custom module - content not displaying

I am practicing MagnetoMagento, So I develop a new custom module . The module is working fine but I have a problem with my layout file. This is what i have got in my layout file.

<?xml version="1.0" encoding="UTF-8"?> 

<layout >


    <ias_myslideshow_index_index>
    
        <reference name="root">
            <action method="setTemplate">
                <template>page/1column.phtml</template>
            </action>
        </reference>
    
        <reference name="content">
            <block type="ias/myslideshow_slideshow" name="ias.myslideshow.slideshow" template="IAS/slideshow.phtml" output="toHtml" />
        </reference>
    
    </ias_myslideshow_index_index>
     
      

</layout>

block type="core/template"

block type="core/template"

Then every static content that I have written in the pthml is displayed but if I try to call a function written in my block it throws an error for not finding the method. If I change block type to

block type="ias/myslideshow_slideshow"

block type="ias/myslideshow_slideshow"

             OR

block type="ias/slideshow"

block type="ias/slideshow"

0.1.0IAS_MySlideshow_HelperIAS_MySlideshow_Blockias_myslideshow_resourceias_myslideshow_slideshowIAS_MySlideshowstandardIAS_MySlideshowslideshowslide-show.xmlIAS_MySlideshow_Adminhtml

Thanks in advance!

<config>
    <modules>
        <IAS_MySlideshow>
            <version>0.1.0</version>
        </IAS_MySlideshow>
    </modules>

    <global>

        <helpers>
        <IAS_MySlideshow>
            <class>IAS_MySlideshow_Helper</class>
        </IAS_MySlideshow>
    </helpers>


        <blocks>
            <IAS_MySlideshow>
                <class>IAS_MySlideshow_Block</class>
            </IAS_MySlideshow>
        </blocks>
    
        <models>
            <IAS_MySlideshow>
                <resourceModel>ias_myslideshow_resource</resourceModel>
            </IAS_MySlideshow>
        
            <ias_myslideshow_resource>
                <entities>
                    <slideshow>
                        <table>ias_myslideshow_slideshow</table>
                    </slideshow>
                </entities>
            </ias_myslideshow_resource>
        </models>
    
        <resources>
            <myslideshow_setup>
                <setup>
                    <module>IAS_MySlideshow</module>
                </setup>
            </myslideshow_setup>
        </resources>
    
    </global>

    <frontend>
        <routers>
            <IAS_MySlideshow>
                <use>standard</use>
                <args>
                    <module>IAS_MySlideshow</module>
                    <frontName>slideshow</frontName>
                </args>
            </IAS_MySlideshow>
        </routers>
    
        <layout>
            <updates>
                <IAS_MySlideshow>
                    <!--this file name can be any name-->
                    <file>slide-show.xml</file>
                </IAS_MySlideshow>
            </updates>
        </layout>
    </frontend>
    
    <admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <IAS_MySlideshow before="Mage_Adminhtml">IAS_MySlideshow_Adminhtml</IAS_MySlideshow>
                </modules>
            </args>
        </adminhtml>
    </routers>
    </admin>
    

</config>

Magento Custom module

I am practicing Magneto, So I develop a new custom module . The module is working fine but I have a problem with my layout file. This is what i have got in my layout file.

<ias_myslideshow_index_index>
    
    <reference name="root">
        <action method="setTemplate">
            <template>page/1column.phtml</template>
        </action>
    </reference>
    
    <reference name="content">
        <block type="ias/myslideshow_slideshow" name="ias.myslideshow.slideshow" template="IAS/slideshow.phtml" output="toHtml" />
    </reference>
    
</ias_myslideshow_index_index>
 
 

block type="core/template"

Then every static content that I have written in the pthml is displayed but if I try to call a function written in my block it throws an error for not finding the method. If I change block type to

block type="ias/myslideshow_slideshow"

             OR

block type="ias/slideshow"

0.1.0IAS_MySlideshow_HelperIAS_MySlideshow_Blockias_myslideshow_resourceias_myslideshow_slideshowIAS_MySlideshowstandardIAS_MySlideshowslideshowslide-show.xmlIAS_MySlideshow_Adminhtml

Thanks in advance!

Debugging custom module - content not displaying

I am practicing Magento, So I develop a new custom module . The module is working fine but I have a problem with my layout file. This is what i have got in my layout file.

<?xml version="1.0" encoding="UTF-8"?> 

<layout >


    <ias_myslideshow_index_index>
    
        <reference name="root">
            <action method="setTemplate">
                <template>page/1column.phtml</template>
            </action>
        </reference>
    
        <reference name="content">
            <block type="ias/myslideshow_slideshow" name="ias.myslideshow.slideshow" template="IAS/slideshow.phtml" output="toHtml" />
        </reference>
    
    </ias_myslideshow_index_index>
     
      

</layout>
block type="core/template"

Then every static content that I have written in the pthml is displayed but if I try to call a function written in my block it throws an error for not finding the method. If I change block type to

block type="ias/myslideshow_slideshow"

             OR

block type="ias/slideshow"
<config>
    <modules>
        <IAS_MySlideshow>
            <version>0.1.0</version>
        </IAS_MySlideshow>
    </modules>

    <global>

        <helpers>
        <IAS_MySlideshow>
            <class>IAS_MySlideshow_Helper</class>
        </IAS_MySlideshow>
    </helpers>


        <blocks>
            <IAS_MySlideshow>
                <class>IAS_MySlideshow_Block</class>
            </IAS_MySlideshow>
        </blocks>
    
        <models>
            <IAS_MySlideshow>
                <resourceModel>ias_myslideshow_resource</resourceModel>
            </IAS_MySlideshow>
        
            <ias_myslideshow_resource>
                <entities>
                    <slideshow>
                        <table>ias_myslideshow_slideshow</table>
                    </slideshow>
                </entities>
            </ias_myslideshow_resource>
        </models>
    
        <resources>
            <myslideshow_setup>
                <setup>
                    <module>IAS_MySlideshow</module>
                </setup>
            </myslideshow_setup>
        </resources>
    
    </global>

    <frontend>
        <routers>
            <IAS_MySlideshow>
                <use>standard</use>
                <args>
                    <module>IAS_MySlideshow</module>
                    <frontName>slideshow</frontName>
                </args>
            </IAS_MySlideshow>
        </routers>
    
        <layout>
            <updates>
                <IAS_MySlideshow>
                    <!--this file name can be any name-->
                    <file>slide-show.xml</file>
                </IAS_MySlideshow>
            </updates>
        </layout>
    </frontend>
    
    <admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <IAS_MySlideshow before="Mage_Adminhtml">IAS_MySlideshow_Adminhtml</IAS_MySlideshow>
                </modules>
            </args>
        </adminhtml>
    </routers>
    </admin>
    

</config>
Source Link
karan
  • 23
  • 2

Magento Custom module

I am practicing Magneto, So I develop a new custom module . The module is working fine but I have a problem with my layout file. This is what i have got in my layout file.

<ias_myslideshow_index_index>
    
    <reference name="root">
        <action method="setTemplate">
            <template>page/1column.phtml</template>
        </action>
    </reference>
    
    <reference name="content">
        <block type="ias/myslideshow_slideshow" name="ias.myslideshow.slideshow" template="IAS/slideshow.phtml" output="toHtml" />
    </reference>
    
</ias_myslideshow_index_index>
 
 

In the block type if I write

block type="core/template"

Then every static content that I have written in the pthml is displayed but if I try to call a function written in my block it throws an error for not finding the method. If I change block type to

block type="ias/myslideshow_slideshow"

             OR

block type="ias/slideshow"

Nothing is display. No static content, no error.

I will really appreciate if some one can let me know what the wrong I am doing. below is my block and config file

0.1.0 IAS_MySlideshow_Helper IAS_MySlideshow_Block ias_myslideshow_resource ias_myslideshow_slideshow IAS_MySlideshow standard IAS_MySlideshow slideshow slide-show.xml IAS_MySlideshow_Adminhtml

Thanks in advance!