I already read this cookbook entry and in my opinion it’s not a really clean way to manage this, but as it seems, there’s no other alternative to solve this. The word “register” in registerMetaTag sounds for me like a “central meta-tags”-register.
Due to some meta tags unique nature (language, robots, author, copyright, …) it would be no big deal to override a already set meta tag from the controller or view.
Anyway thank your very much and now I’ll explore the rest
The old post, but I am wandering if the following is much easier:
In main.php I have params ‘keyWords’ and ‘description’ with default values for the application.
//I can set any value in action or controller by modifying the above params:
Yii::app()->params['keyWords']='new key word';
Yii::app()->params['description']='new description';
//in layouts I have:
<meta name="Keywords" content="<?php echo Yii::app()->params['keyWords']; ?>">
<meta name="Description" content="<?php echo Yii::app()->params['description']; ?>">