Just to follow up - I managed to get the output that I was after. (and it is simple)
I ended up using the ‘CActiveDataProvider’ - and not in the company controller.
So as noted in the first post I used Gii to create the models/controllers/views (and it did a pretty good job)
I added to /protected/controllers/StaffController.php
public function actionIndexc()
$dataProvider=new CActiveDataProvider('Staff', array(
Being new to this and having the code already pregenerated I copied the /staff/index.php and renamed to indexc.php - no additional code changes required, may need to make changes to this later but for now it works.
Gii auto generated the accessRules() in the StaffController.php - make sure to add ‘indexc’ to the access rules otherwise you get access denied
In /views/company/view.php I added the following line to the menu array
array('label'=>'Staff', 'url'=>array('/staff/indexc', 'id'=>$model->id)),
Something I found along the way - Blank pages occour for various reasons the more noteable ones I know off is if you
dont have the $this->render
brackets ( ) - forget to put one in, Have an extra one somewhere
and code that Yii has no idea how to handle such as trying to put $_GET into the condition statement directly