$comments = $this->requestAction('/comments/latest'); foreach ($comments as $comment) { echo $comment['Comment']['title']; }
echo $this->requestAction( array('controller' => 'articles', 'action' => 'featured'), array('return') );
这种方式,可以直接返回一个变量或者对象,也可以返回一个html渲染的结果用于现实在页面上