我的主页被重定向到产品页面,但我仍然希望主页上的横幅显示出来。
任何人都知道如何将横幅添加到我的产品页面?对Magento来说很新...当然没有Joomla那么容易。
Magento中有句柄,用于决定调用特定控制器时要显示的块。
看看这个文件/magento/app/design/frontend/base/default/layout/catalog.xml并找到以下行
<catalog_product_view translate="label">
<label>Catalog Product View (Any)</label>
<!-- Mage_Catalog -->
<reference name="root">
<action method="setTemplate">
<template>page/2columns-right.phtml</template>
</action>
</reference>
<reference name="content">
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
<!-- Some more code -->
</block>
</reference>
<!-- Some more code -->
</catalog_product_view>
catalog_product_view是您可能希望用于在产品页面上显示横幅的句柄。
选择该句柄并编写特定于块的代码。
如果您想使用扩展来简化您的任务,这里就是一个。
您可以在产品页面上调用横幅代码。或者,如果您想使用简单的技术,请使用iframe。