site/index view dosyamın içinde
<div class="kullanicilar"> </div>
bu div içine KullanicilarControllerin/index ni include etmem göstermem gerekiyor nasıl yaparım ?
Posted 28 December 2012 - 04:34 AM
<div class="kullanicilar"> </div>
Posted 28 December 2012 - 07:05 AM
..
public function actionIndex(){
$dataList='site controller bilgileriniz';
$kullaniciList = Kullanici::model()->findAll(); // kullanici tablonuzdaki tüm bilgiler
$this->render('index',array('dataList'=>$dataList,'kullaniciList'=>$kullaniciList));
}
..
<div class="kullanicilar">
<?php
foreach($kullaniciList as $kullanici){
echo $kullanici->name;
echo $kullanici->attribute2;
echo $kullanici->attribute3;
}
?>
</div>
Posted 07 January 2013 - 04:32 AM
Posted 07 January 2013 - 04:40 AM
//controller
public function partialindex(){
$this->renderPartial('index');
}
//view <div class="index"> <?PHP SiteController::partialindex()?> </div>