how to use dataProvider result inside the actionView function it self

	public function actionView($id)


		$pageDataProvider = new CActiveDataProvider('Page', array(






		echo "page layout: ".$pageDataProvider->layout;







you see what I am trying to do

echo "page layout: ".$pageDataProvider->layout;

its not working ofc, error:

Property "CActiveDataProvider.layout" is not defined.

Can anyone help me with this, how do I get some data out of $pageDataProvider directly in the function it self and not the view?

What data do you need? If you want an array of found models, then use:


CActiveDataProvider::getData() always returns an array of objects. There are no benefits to using dataprovider when you want to retrieve a single record by its primary key. Just use