2012-11-14 45 views
0

我希望這不是一個愚蠢的問題,我認爲這將是一個基本的local.xml更新,但似乎無法得到它工作。將塊左移內容(賬戶導航)Magento(1列布局)

問題;我已經在我的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> 

非常感謝任何幫助傢伙。

+0

它到底是什麼? –

+0

它將佈局恢復爲基本主題。 –

回答

1

好吧,所以我終於不再是一個白癡,並想出了這一點。我基本上改變了我目前正在從2列頁面開發到單列布局的magento站點中我的帳戶索引頁面的佈局。然後問題是將帳戶導航添加到單列布局的主要內容中......嘗試了幾件事後,我意識到使用多個元素來創建帳戶導航塊。我今天早上更新了我的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>