1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Layout fails to overwrite template file

Discussion in 'Programming/Internet' started by Black, Oct 8, 2018.

  1. Black

    Black Guest

    I try to overwrite a template file with another one which I provide with my extension.

    I want to overwrite the template file app\design\frontend\venedor\customdesign\template\page\template\top_links.phtml with app\design\frontend\base\default\template\recaptcha\page\template\top_links.phtml.

    config.xml

    <?xml version="1.0" encoding="utf-8"?>
    <config>
    ...
    <frontend>
    <layout>
    <updates>
    <recaptcha>
    <file>recaptcha.xml</file>
    </recaptcha>
    </updates>
    </layout>
    </frontend>
    ...


    I found the following layout conditions in:

    app\design\frontend\venedor\customdesign\layout\local.xml

    <default>
    ...

    <reference name="top.links">
    <action method="setTemplate">
    <template>page/template/top_links.phtml</template>
    </action>

    <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/mini_toplinks.phtml" before="-">
    <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
    <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
    <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
    <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
    <label>Shopping Cart Sidebar Extra Actions</label>
    </block>
    </block>
    </reference>


    So I copied these conditions to the layout file of my extension and changed the template instruction:

    app\design\frontend\base\default\layout\recaptcha.xml

    <?xml version="1.0"?>
    <layout version="0.1.0">
    <default>
    <reference name="top.links">
    <action method="setTemplate">
    <template>recaptcha/page/template/top_links.phtml</template>
    </action>

    <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/mini_toplinks.phtml" before="-">
    <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
    <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
    <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
    <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
    <label>Shopping Cart Sidebar Extra Actions</label>
    </block>
    </block>
    </reference>
    ...


    But the old template is still getting loaded instead of the one which I provide through my extension.

    I already cleared the cache. There are no infos in the logfiles about this.

    Please advice.

    Login To add answer/comment
     

Share This Page