我知道:
<action method="unsetChild"><name>as</name></action>
是否可以将所有子级都移到一行中?例如:
<action method="unsetChild"><name>*</name></action>
或类似的东西..?
更新-解答:
<action method="unsetChildren"/>
似乎做得很好。
最佳答案
不要害怕阅读基块类的源文件。
#File: app/code/core/Mage/Core/Block/Abstract.php
public function unsetChildren()
{
$this->_children = array();
$this->_sortedChildren = array();
return $this;
}
这些方法有无数的答案。
关于Magento:为所有 child 阻止unsetChild吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20455824/