Jas*_*sit 5 php templates magento magento-1.7
我一直在玩magento的PHP文件.但是,我似乎无法弄清楚是什么被拉出来的
<?php echo $this->getChildHtml('content') ?>
Run Code Online (Sandbox Code Playgroud)
从哪里来的.例如,我可以看到一些文本显示"主页",但我无法通过浏览下面的各种文件找到它的来源,/app/design/frontend/base/default
并打开模板路径提示没有帮助.
我正在运行的magento版本是1.7.0.2.任何帮助将不胜感激.
内容块是一个结构块,用于包装页面内容的所有块。getChildHtml('content') 加载在布局“content”中添加的所有块
1. xml via <reference name="content"><block type="core/template') name="test" template="test.phtml"/>
2. code via $this->getLayout()->getBlock('content')->append($block);
Run Code Online (Sandbox Code Playgroud)
调用“content”内每个块的 toHtml 方法来返回其 html