Yii - Generation Of Page Meta Information From Db

Hi Guys,

I need help regarding generating meta tags from database and setting them in different controller actions.

I have a table in DB, where I store meta information (keywords, description) for each controller action. I want to select this values in every action and set the tags fetched from DB using registerMetaTag().

What I want to know is how much this queries will effect page load time, and if there is a better approach for doing this?

Thanks,

Mark

Check out the ‘settings’ extension which using cacheing to minimize database hits.

You basically store name-value pairs (w/category) in a settings table. When the settings are updated the cache is invalid so it will requery the DB but after that point the results are cached and there is very little impact to pulling data from cache.

There should be some way to pull in the settings for each controller action without rewriting the same function in every controller. Can a base controller function refer to the child controller name that is extending it?