【问题标题】:How can I add a new block reference for widget instance in Magento?如何在 Magento 中为小部件实例添加新的块引用?
【发布时间】:2012-07-17 03:22:02
【问题描述】:

在 magento (Admin > CMS > Widget Instance) 中添加新的小部件实例时,您需要为其选择布局更新。在块引用选项中,有几个默认区域,如页面顶部、页面底部、左侧、右侧....如何将自定义新区域添加到此选择框?

【问题讨论】:

    标签: magento widget


    【解决方案1】:

    好的。找到了答案。转到page.xml,添加这个

    <block type="core/text_list" name="custom_script" as="custom_script" translate="label">
        <label>IMPORTANT TO HAVE THIS TAG</label>
    </block>
    

    重要的标签是&lt;label&gt;。没有这个,您将看不到选择框中的区域。感谢Anthony Nguyen。

    【讨论】:

    • 只将这种代码添加到您自己的设计文件中,除非您想在更新 Magento 时丢失它。
    • page.xml 位于哪里,以便我可以在我的主题中模仿文件夹结构?
    猜你喜欢
    • 1970-01-01
    • 2023-03-31
    • 1970-01-01
    • 2019-10-14
    • 1970-01-01
    • 2016-11-26
    • 2015-10-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多