Custom Magento extension not being called on CMS page

I am creating an extension in Magento, but when I include it in the CMS page, it is not called. No errors or warnings. I tried to put the debug line in the extension, but those lines don't show up either. So I think this is a configuration issue.

Here is my config.xml file:

<config>
<modules>
    <Medialta_Promo>
        <version>0.1.0</version>
    </Medialta_Promo>
</modules>

<global>
    <blocks>
        <promo>
            <class>Medialta_Promo_Block</class>
        </promo>
    </blocks>

    <helpers>
        <promo>
            <class>Medialta_Promo_Helper</class>
        </promo>
    </helpers>

    <models>
        <promo>
            <class>Medialta_Promo_Model</class>
        </promo>
    </models>

    <resources>
        <promo_setup>
            <setup>
                <module>Medialta_Promo</module>
                <class>Mage_Eav_Model_Entity_Setup</class>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </promo_setup>

        <promo_write>
            <connection>
                <use>core_write</use>
            </connection>
        </promo_write>
        <promo_read>
            <connection>
                <use>core_read</use>
            </connection>
        </promo_read>
    </resources>
</global>

<frontend>
    <routers>
        <promo>
            <use>standard</use>
            <args>
                <module>Medialta_Promo</module>
                <frontName>promo</frontName>
            </args>
        </promo>
    </routers>
    <layout>
        <updates>
            <promo>
                <file>promo.xml</file>
            </promo>
        </updates>
    </layout>
</frontend>

<default>
    <promo>
        <general>
            <active>0</active>
            <price_visible>1</price_visible>
        </general>
        <cmspage>
            <heading_block>Promotions</heading_block>
            <product_sort_by>random</product_sort_by>
            <number_of_items>5</number_of_items>
            <number_of_items_per_row>3</number_of_items_per_row>
            <max-image_dimension>80</max-image_dimension>
        </cmspage>
        <standalone>
            <heading>Promo</heading>
            <layout>two_colomns_right</layout>
            <meta_title>Promo</meta_title>
            <meta_description>Retrouver tous les produits en promotions</meta_description>
            <meta_keywords>promo</meta_keywords>
        </standalone>
    </promo>
</default>
</config>

      

And here is my template config:

    <?xml version="1.0"?>
<layout version="0.1.0">
    <promo_index_index>
        <reference name="content">
            <block type="core/template" name="category.products" template="medialta/promo/view.phtml">
                <block type="promo/product_list" name="promo_list" as="medialta/promo/view.phtml">
                    <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                        <block type="page/html_pager" name="product_list_toolbar_pager"/>
                    </block>
                    <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
                </block>
            </block>
        </reference>
    </promo_index_index>
</layout>

      

Thanks for your help, I got through a few days and I have no idea what to do about it.

+3


source to share


1 answer


Moving the solution provided by @VigneshBala in the comments instead of the answer:

There is a problem in the layout with the block declaration for promo/product_list

. It looks like you mistakenly put the template path in an attribute as

when it should be declared as template

.

Before



<block type="promo/product_list" name="promo_list" as="medialta/promo/view.phtml">

      

After

<block type="promo/product_list" name="promo_list" template="medialta/promo/view.phtml">

      

0


source







All Articles