Make CClientScript::renderHead() as public function

I need to set meta tag on my application. So I need to set meta tag from my page controller. I tried to use CClientScript::renderHead() but it's a protected function so I can't call it direct from Controller class.

My question, Is there any other method to set my head tag on output method? Or it's need to modify the renderHead function to public function?

I don't think it's appropriate to make renderHead as public.

Instead, we should provide support for adding meta tags. Could you please create a ticket for this?

Ticket created on…es/detail?id=55


Also, registerLink could be useful :)

Personally I like the ZF Placeholder Helper implementation for Doctype, HeadLink, HeadMeta, HeadScript, HeadStyle, HeadTitle, InlineScript.

see http://framework.zen…ew.helpers.html

Thank you for the pointer. I will take a look and see if we can implement similar feature.

You may also take a look the "clip" feature in Yii, which implements similar placeholder feature. Check CBaseController::beginClip.