Place holders

Placeholders that would be replaced in render or before final output. This is for dynamic content.

Variables:




...html

{{placeholder1}}

...html



placeholder1 would be the key for the placeholder array somewhere.

Class based:




...html

{{Class:2}}

...html



Possibly some default method present in the class that would be passed 2 as the parameter.

Could then query etc. returning a string to insert.

this is already exists actually… ::)

Can you provide the link to this so anyone else searching can find it too.

Anything you pass into the array parameter to the render or renderPartial functions are available in the view.


$this->render('view', array('var1' => $var1));

If you want more templatized approach, then check out the various template extensions.

http://www.yiiframework.com/doc/guide/1.1/en/topics.prado

Why to be lazy? for who the guide wroten :huh: