×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
two views of two tables in one
Michele Calzone
Yeni Üye
Posts: 3
9 yıl 8 ay önce #770
Yazan: Michele Calzone
two views of two tables in one, Michele Calzone tarafından oluşturuldu
is possibile to combine two views of two tables in one ? if you like ?
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Anthony Ceccarelli
Yeni Üye
Posts: 2
9 yıl 7 ay önce #841
Yazan: Anthony Ceccarelli
Easy Timetable, a user-friendly schedule management system build with Component Creator
Anthony Ceccarelli tarafından two views of two tables in one konusunda yanıtlandı
Hello,
yes, it's possible to show data from two or more tables in one view. I had to do that so I searched for it. It's quite simple but I don't know if it's the right way :
For a list of items, in the view.html.php I add these lines (Joomla 3) :
Then in the default.php (for example) use a foreach function to get the data :
Hope it helps !
yes, it's possible to show data from two or more tables in one view. I had to do that so I searched for it. It's quite simple but I don't know if it's the right way :
For a list of items, in the view.html.php I add these lines (Joomla 3) :
$model2 = JModelList::getInstance('NameOfYourModel', 'YourComponentModel');
$this->modelData = $model2->getItems();
foreach ($this->modelData as $key=>$value) {
echo $value->id;
echo $value->category;
//... etc
}
Easy Timetable, a user-friendly schedule management system build with Component Creator
Şu kullanıcı(lar) Teşekkür etti: Andres Maeso
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Sayfa oluşturma süresi: 0.047 saniye