Блок не загружается должным образом - PullRequest
1 голос
/ 29 декабря 2011

Я использую Magento VAR-1.6

Мне нужно добавить новый файл шаблона (.html) в функцию. Я добавляю блок в XML, но страница показывает шаблон, загруженный дважды.

Это код, который я добавил в customer.xml

<customer_account_customeraccount translate="label">
    <label>Customer Account Page</label>
    <!-- Mage_Customer -->
    <remove name="right"/>
    <remove name="left"/>

    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="content">
        <block type="core/template" name="customer_account_page" template="persistent/customer_account.phtml" />
    </reference>
</customer_account_customeraccount>

Может ли кто-нибудь найти проблему?

1 Ответ

1 голос
/ 29 декабря 2011

Правильно ли я догадываюсь, что вы пытаетесь заменить шаблон для блока customer_account_page?

В этом случае вы должны уметь:

<customer_account_customeraccount translate="label">
    <label>Customer Account Page</label>
    <!-- Mage_Customer -->
    <remove name="right"/>
    <remove name="left"/>

    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="customer_account_page">
        <action method="setTemplate"><template>persistent/customer_account.phtml</template></action>
    </reference>
</customer_account_customeraccount>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...