Reputation: 293
I am trying to override a block that belongs to another module with my own block within the same theme.
another extension layout:
<reference name="content">
<block type="opc/wrapper" name="es.checkout.container" template="opc/wrapper.phtml">
<!-- LOGIN FORM -->
<block type="opc/onepage_login" name="checkout.onepage.login" as="login" template="opc/onepage/login.phtml">
<block type="customer/account_forgotpassword" name="forgotPassword" template="opc/customer/form/forgotpassword.phtml"/>
</block>
<!-- BILLING FORM -->
<block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="opc/onepage/billing.phtml"/>
<!-- SHIPPING FORM -->
<block type="checkout/onepage_shipping" name="checkout.onepage.shipping" as="shipping" template="opc/onepage/shipping.phtml"/>
My layout:
<opc_index_index>
<reference name="head">
<action method="addItem"><type>skin_js</type><name>js/doniking/jne/iwd_opc.js</name></action>
</reference>
<reference name="es.checkout.container">
<action method="setTemplate">
<template>doniking/jne/iwd/opc/wrapper.phtml</template>
</action>
</reference>
<reference name="checkout.onepage.billing">
<action method="setTemplate">
<template>doniking/jne/iwd/opc/billing.phtml</template>
</action>
</reference>
My layout is loaded by magento before another module layout so the block doesn't override it. How to make it loaded after that overridden block?
I dont want to use
<Depends />
Because my module doesn't require the other module.
Upvotes: 0
Views: 435
Reputation: 1044
You either need to name your module after the other third party module alphabetically (as modules load alphabetically unless using depends to set the load order), or if you can't do that then using depends is your only feasible option.
If you are happy not to have the layout defined in your own modules layout file then you can use local.xml which will load after all core, and third party module layout files.
Upvotes: 1