Zend framework 视图中的renderWidget不执行任何操作
我试图为会员们添加一种评论文章的方式。根据我收集的信息,它应该简单到使用:Zend framework 视图中的renderWidget不执行任何操作,zend-framework,socialengine,Zend Framework,Socialengine,我试图为会员们添加一种评论文章的方式。根据我收集的信息,它应该简单到使用: <?php echo $this->content()->renderWidget('modulename.widget-name') ?> 在我看来,这是我的尝试: <div> <?php echo("<h2>".$this->news['title']."</h2>"); print_r($this->news['news']);
<?php echo $this->content()->renderWidget('modulename.widget-name') ?>
在我看来,这是我的尝试:
<div>
<?php
echo("<h2>".$this->news['title']."</h2>");
print_r($this->news['news']);
echo $this->content()->renderWidget('core.comment')
?>
</div>
我的页面底部似乎只有一个空的
标签
有人知道我做错了什么吗
编辑:适用于
'core.admin dashboard'
,但不适用于'core.comment'
。这是为什么?Widget core.comment仅当您放置此小部件的页面具有主题且该主题具有“comments”和“like”方法时才会出现:
if( !($subject instanceof Core_Model_Item_Abstract) ||
!$subject->getIdentity() ||
(!method_exists($subject, 'comments') && !method_exists($subject, 'likes')) ) {
return $this->setNoRender();
}
希望这有帮助