【发布时间】:2011-04-08 13:58:35
【问题描述】:
我确定我之前在某个地方看到过,为 xml ifconfig 语句指定了一个值(默认为布尔值)。无论如何,在管理员中禁用模块实际上不起作用(仅禁用模块输出)。 但是您可以在布局文件中添加 ifconfig,例如,仅当模块禁用时设置模板如下:
<action method="setTemplate" ifconfig="advanced/modules_disable_output/Myname_Mymodule">
<template>mytemplate.phtml</template>
</action>
那么你怎么能颠倒这个,所以只有当模块启用时才设置模板?比如:
<action method="setTemplate" ifconfig="advanced/modules_disable_output/Myname_Mymodule" value="0">
<template>mytemplate.phtml</template>
</action>
【问题讨论】:
标签: magento