Answer the question
In order to leave comments, you need to log in
How to pass a variable through a clip in Yii?
Good afternoon, I muddied the following code in the actionIndex of the SiteController controller :
$this->beginClip('mainPageNews');
echo '<ul>';
foreach($news as $item){
echo '<li>';
echo CHtml::link($item->NAME,array('news/item/code/'.$item->CODE));
echo '</li>';
}
echo '</ul>';
$this->endClip();
<?php if(!empty($this->clips['mainPageContent'])) echo $this->clips['mainPageContent'];?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question