Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento: Override only a part of a layout xml-File
    primarykey
    data
    text
    <p>I only want to change a part of the file checkout.xml (this file is in the core layout-folder). I create my own extension and link to my own layout-xml-File in my config.xml. </p> <pre><code>&lt;layout&gt; &lt;updates&gt; &lt;checkout&gt; &lt;file&gt;mymodule_checkout.xml&lt;/file&gt; &lt;/checkout&gt; &lt;/updates&gt; &lt;/layout&gt; </code></pre> <p>There are no problems, when i copy the whole file checkout.xml and save it as mymodule_checkout.xml. But I only want to override a little part of this big file between</p> <pre><code>&lt;reference name="content"&gt; </code></pre> <p>and</p> <pre><code>&lt;/reference&gt; </code></pre> <p>In this case, when i only write the parts that i needed, magento only read my file with this parts. So magento don't get the remaining parts of the original checkout.xml.</p> <p>Is it possible to only change a part of a core layout xml-File without copying the whole file or change the core. </p> <p>The Code of mymodule.xml looks like this:</p> <pre><code>&lt;layout version="0.1.0"&gt; &lt;checkout_onepage_index translate="label"&gt; &lt;reference name="content"&gt; &lt;block type="checkout/onepage" name="checkout.onepage" template="checkout/onepage.phtml"&gt; &lt;block type="checkout/onepage_login" name="checkout.onepage.login" as="login" template="checkout/onepage/login.phtml"&gt; &lt;block type="page/html_wrapper" name="checkout.onepage.login.before" as="login_before" translate="label"&gt; &lt;label&gt;Login/Registration Before&lt;/label&gt; &lt;action method="setMayBeInvisible"&gt; &lt;value&gt;1&lt;/value&gt; &lt;/action&gt; &lt;/block&gt; &lt;block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="checkout/onepage/billing.phtml"/&gt; &lt;block type="checkout/onepage_shipping" name="checkout.onepage.shipping" as="shipping" template="checkout/onepage/shipping.phtml"/&gt; &lt;/block&gt; &lt;block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method" as="shipping_method" template="checkout/onepage/shipping_method.phtml"&gt; &lt;block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="checkout/onepage/shipping_method/available.phtml"/&gt; &lt;block type="checkout/onepage_shipping_method_additional" name="checkout.onepage.shipping_method.additional" as="additional" template="checkout/onepage/shipping_method/additional.phtml"/&gt; &lt;/block&gt; &lt;block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment" template="checkout/onepage/payment.phtml"&gt; &lt;block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="checkout/onepage/payment/methods.phtml"&gt; &lt;action method="setMethodFormTemplate"&gt; &lt;method&gt;purchaseorder&lt;/method&gt; &lt;template&gt;payment/form/purchaseorder.phtml&lt;/template&gt; &lt;/action&gt; &lt;/block&gt; &lt;/block&gt; &lt;block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="checkout/onepage/review.phtml"/&gt; &lt;/block&gt; &lt;/reference&gt; &lt;/checkout_onepage_index&gt; &lt;/layout&gt; </code></pre> <p>Thats the part I need. In this Case, magento take only this code not the remaining code of the core xml-file.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload