Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将视图中的一些参数传递给该视图调用的 cportlet 小部件,但是当我这样做时它似乎不起作用:
<?php $this->beginWidget('zii.widgets.CPortlet'); $this->widget('ProductsBrowser', array('params'=>$params)); $this->endWidget(); ?>
我怎样才能成功地完成它?请帮我!谢谢!!
你读过文档吗? http://www.yiiframework.com/doc/guide/1.1/en/extension.use#widget这应该可以。
正确的方法如图
<?php $this->beginWidget('zii.widgets.CPortlet', array( 'params'=>$params)); ?> //body content <?php $this->endWidget(); ?>