Note that there are some explanatory texts on larger screens.

plurals
  1. PORemoving a block nested in a block via the local.xml file
    primarykey
    data
    text
    <p>I'm trying to use my local.xml file (where I do all my updates to the layout&#41; to remove a block that is nested in another block. I can easily remove a block via the &lt;remove&gt; tag, or using the unsetChild method, but I can't seem to remove a block that is nested in another block.</p> <p>Here is the line of code I am trying to remove (located in the customer.xml file&#41;. In particular, it's the block called "customer_account_dashboard_newsletter"</p> <pre><code>&lt;customer_account_index translate="label"&gt; &lt;label&gt;Customer My Account Dashboard&lt;/label&gt; &lt;update handle="customer_account"/&gt; &lt;!-- Mage_Customer --&gt; &lt;reference name="root"&gt; &lt;action method="setTemplate"&gt;&lt;template&gt;page/2columns-left.phtml&lt;/template&gt;&lt;/action&gt; &lt;/reference&gt; &lt;reference name="my.account.wrapper"&gt; &lt;block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml"&gt; &lt;block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/&gt; &lt;block type="core/template" name="customer_account_dashboard_top" as="top" /&gt; &lt;block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/&gt; &lt;block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/&gt; &lt;block type="customer/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/&gt; &lt;block type="core/template" name="customer_account_dashboard_info1" as="info1" /&gt; &lt;block type="core/template" name="customer_account_dashboard_info2" as="info2" /&gt; &lt;/block&gt; &lt;/reference&gt; &lt;/customer_account_index&gt; </code></pre> <p>I realize this doesn't work right now, but here is my starting point (located in my local.xml file):</p> <pre><code>&lt;customer_account_index&gt; &lt;reference name="my.account.wrapper"&gt; &lt;action method="unsetChild"&gt;&lt;name&gt;customer_account_dashboard_newsletter&lt;/name&gt;&lt;/action&gt; &lt;/reference&gt; &lt;/customer_account_index&gt; </code></pre> <p>Any thoughts? Thank you.</p>
    singulars
    1. This table or related slice is empty.
    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