2013-01-08 161 views

回答

1

XML

確保你有你的配置設置你的主題page.xml

<block reference="header"> 
    <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/> 
</block> 

查看

您需要調用HTML項目本身

<?php echo $this->getChildHtml('breadcrumbs') ?> 
+0

我已經這樣做了,我不再有任何錯誤了。然而,麪包屑仍然沒有出現。 –

+0

確保在CMS中打開了麪包屑。我認爲這是Web Tab> Configuration> General。 (切換到您的商店視圖) – phpisuber01

+0

是的,麪包屑打開,只是檢查 –

0

我有同樣的困惑。我設法在目錄/產品添加以下到應用程序/設計/前端/主題/默認/佈局/ calalog.xml

<catalog_product_view translate="label"> 
    <-- existing content --> 
    <reference name="content"> 
     <-- existing blocks --> 
     <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml"> 
      <-- existing blocks --> 
      <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/> 
     </block> 
    </reference> 
    <-- existing content --> 
</catalog_product_view> 

然後/讓產品頁面上的麪包屑view.phtml添加以下在那裏你希望麪包屑出現。

<?php echo $this->getChildHtml('breadcrumbs') ?> 
相關問題