Thus far, I have only used CListView with the search scenario/method, and to return results against a single model. I would now like to use multiple lists within a page. I have the following related models:
class Area extends CActiveRecord {
public function relations() {
return array(
'groups' => array(self::HAS_MANY, 'Group', 'area_id')
);
}
}
class Group extends CActiveRecord {
public function relations() {
return array(
'people' => array(self::HAS_MANY, 'Person', 'group_id')
);
}
}
class Person extends CActiveRecord {
}
I want to create a view that displays all groups (i.e. a dynamic number) within an area, then each group has its own CListView to allow for pagination of the people within it. I have made several attempts at this, but to no avail, as basically I’m unsure on how to write the controller action so that pagination page changes can find their way back to their related group. Can anyone advise?
Thanks.