我正在使用GrayScale模板,並且我希望將最近查看的內容移動到頁腳之前的塊中。 我需要使用與頁腳不同顏色的此塊。 所以,我刪除page.xml的塊:Magento:在頁腳之前添加塊
<block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
,並添加到page.xml的頁腳塊:
<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
<block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
<block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
<label>Page Footer</label>
<action method="setElementClass"><value>bottom-container</value></action>
</block>
<block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>
<block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
</block>
完美! 但是,我需要此頁腳之前,並沒有在裏面... 我該怎麼做?
謝謝!
嘿!謝謝你的回答。最近看過的內容保留在頁腳內。 (div class =「footer-container」) –
我不清楚你寫的是什麼?請詳細說明。 – Subrata
你可以在任何你想要的地方調用<?php echo $ this-> getChildHtml('recently_viewed')?>。您可以將其保留在頁腳內。 (div class =「footer-container」)。而且,如果您發現此答案有幫助,請接受答案:D – Subrata