2

I'm trying to override "content" block of page.xml. It works with default design package. I can output products in content block:

enter image description here

but with rwd package it not overriding "content":

enter image description here no matter if I put my 'trening' theme in rwd or default directory:

enter image description here

#\app\code\local\Trening\NewModule\etc\config.xml
<?xml version="1.0"?>
<config>
    <global>
        <models>
            <newmodule>
                <class>Trening_NewModule_Model</class>
            </newmodule>
        </models>
        <blocks>
            <newmodule>
                <class>Trening_NewModule_Block</class>
            </newmodule>
        </blocks>
        <helpers>
            <newmodule>
                <class>Trening_NewModule_Helper</class>
            </newmodule>
        </helpers>

        <events>
            <customer_login>
                <observers>
                    <NewModule>
                        <type>model</type>
                        <class>NewModule/observer</class>
                        <method>logCustomer</method>
                    </NewModule>
                </observers>
            </customer_login>
        </events>
    </global>

    <frontend>
        <routers>
            <trening_newmodule>
                <use>standard</use> <!--standardowy router, (nie ważne, trzeba to wpisać)-->
                <args>
                    <module>Trening_NewModule</module>
                    <frontName>trening</frontName> <!--pierwszy człon adresu url który ma prowadzić do tego modułu  localhost/trening/.../..-->
                </args>
            </trening_newmodule>
            <catalog> //nadpisanie kontrolera catalog/product
                <args>
                    <modules>
                        <demo before="Mage_Catalog">Trening_NewModule</demo>
                    </modules>
                </args>
            </catalog>
        </routers>
        <layout>
            <updates>
                <newmodule>
                    <file>trening.xml</file>
                </newmodule>
            </updates>
        </layout>
    </frontend>
</config>

How to do it to make it work in rwd?

2

You have to add rwd in Current Package Name in admin Desing tab instead of default.

You have to add page.xml inside app/design/frontend/rwd/default/layout/page.xml.

You have to remove your custom trening directory frontend/rwd/default/trening and move trening.xml and myproducts.phtml to respectable rwd/layout/ and rwd/templatedirectories then leave blank inputs in theme admin Desing tab or (better solution) move your trening directory level up to rwd/ directory not rwd/default/ and stay with 'trening' name in admin Design Themes Default input.

enter image description here

Clear cache and check.

  • I added rwd in Current Package Name , check my 2nd picture. Also app/design/frontend/rwd/default/layout/page.xml is there by default. – user6827096 Jan 19 '17 at 5:06
  • have you remove var folder and clear cache. – Rakesh Jesadiya Jan 19 '17 at 5:07
  • Im working in dev mode, anyway I cleared cache and removed var dir and still same. – user6827096 Jan 19 '17 at 5:10
  • have you check in backend, System -> design tab with any defau;t theme is not defined? – Rakesh Jesadiya Jan 19 '17 at 5:13
  • 1
    Got it you have keep treingin folder inside default folder it is wrong. you have to keep trening.xml file inside rwd/default/layout/trening.xml and rwd/default/template/trening/mytemplate.phtml file, – Rakesh Jesadiya Jan 19 '17 at 5:39

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.