aoepeople / aoe_layoutmanager
从后端更新布局XML
0.2.0
2014-09-26 21:38 UTC
Requires
This package is not auto-updated.
Last update: 2024-09-14 18:09:39 UTC
README
描述
此模块允许高级用户(具备一些Magento知识)通过在Magento后端记录中添加布局xml。
作者:Manish Jain
安装
请记住在克隆时使用--recursive
参数
git clone --recursive https://github.com/AOEpeople/Aoe_LayoutManager.git Aoe_LayoutManager
该模块附带modman配置文件。
用法
在不部署代码的情况下修改布局(例如,用于临时修复或当没有Magento访问权限的开发者需要添加新服务中的JavaScript时)修改给定时间段的布局
工作原理
安装模块并清除缓存。一旦安装了AOE Layout Manager模块,就会在Admin -> System -> AOE Layout Manager中显示菜单。点击AOE Layout菜单以添加布局xml
示例
<reference name="head">
<block type="core/text" name="helloworld">
<action method="setText"><text><![CDATA[<script type="text/javascript">alert('Hello World')</script>]]></text></action>
</block>
</reference>
调试助手
这些块帮助您了解给定页面使用的布局句柄(使用handle "default"在调试时在所有页面上启用助手)
将此片段(使用Aoe_LayoutManager)添加到显示给定页面上使用的所有句柄,将其添加到head块作为HTML注释
<reference name="head">
<block type="aoe_layoutManager/layoutHandles" name="aoe_layout_manager.debug" />
</reference>
或作为内容区域中的可见列表
<reference name="content">
<block type="aoe_layoutManager/layoutHandles" name="aoe_layout_manager.debug">
<action method="setIsVisible"><param>1</param></action>
</block>
</reference>