dpd3447 2014-12-02 06:24
浏览 44
已采纳

如何在产品页面中添加横幅? (magento的)

I have my homepage redirected to a product page, but I still want my banners from the home page to show up.

Anyone have any clue how I can add banners to my product page ? Pretty new to Magento... Certainly not as easy as Joomla.

  • 写回答

2条回答 默认 最新

  • doumu5934 2014-12-02 06:33
    关注

    There are handles in Magento who decide what block to show when specific controller is called.
    Take a look at this file /magento/app/design/frontend/base/default/layout/catalog.xml and find following lines

    <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 is the handle you may want to use for displaying the banner on product page.

    Pick that handle and write the block specific code.

    If you want to use an extension to simplify your task here is the one.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止
  • ¥15 Qt下使用tcp获取数据的详细操作
  • ¥15 idea右下角设置编码是灰色的
  • ¥15 全志H618ROM新增分区
  • ¥15 在grasshopper里DrawViewportWires更改预览后,禁用电池仍然显示