Which of the following will set a template only if a particular module is disabled in Magento?

  • <action method=”setTemplate” ifconfig=”advanced/modules_disable_output/Myname_Mymodule”> <template>mytemplate.phtml</template> </action>

ПРАВИЛЬНЫЙ ОТВЕТ:

  • Using File: app/code/core/Mage/Core/Model/Layout.php protected function _generateAction($node, $parent) { if (isset($node[‘ifconfig’]) && ($configPath = (string)$node[‘ifconfig’])) { if (!Mage::getStoreConfigFlag($configPath)) { return $this; } }

  • <action method=”setTemplate”> <template helper=”mymodule/myhelper/switchTemplateIf”/> </action>

  • None of these.

stackoverflow.com/questions/5596193