0

これがばかげた質問ではないことを願っています。基本的な local.xml の更新だと思っていましたが、うまくいかないようです。

問題; Magento サイトで 1 列のレイアウトを設定しました。これにより、'customer_account_navigation' を保持する左側の列が (明らかに) 削除されます。次に、local.xml を更新して「customer_account_navigation」を「content」に移動しようとしましたが、これによりサイトが壊れます。

以下のコード。

<customer_account_index>
<reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
<reference name="left">
    <remove name="customer_account_navigation"/>
</reference>
<reference name="content">
        <block type="customer/account_navigation" name="customer_account_navigation" template="customer/account/navigation.phtml">
</reference>
</customer_account_index>

助けてくれてありがとう。

4

1 に答える 1

1

わかりました、それで私はついにばかであることをやめ、これを理解しました. 現在開発中のmagentoサイトのマイアカウントのインデックスページのレイアウトを基本的に2列のページから1列のレイアウトに変更しました。問題は、アカウント ナビゲーションを 1 列レイアウトのメイン コンテンツに戻すことでした... いくつか試してみたところ、アカウント ナビゲーション ブロックを作成するために複数の要素が使用されていることがわかりました。今朝 local.xml を更新し、最終的に機能するようになりました。コードは以下のとおりです。

<customer_account_index>
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="content">
        <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">
             <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action>
             <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action>
             <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action>
        </block>
    </reference>
</customer_account_index>
于 2012-11-15T12:55:10.487 に答える