I need to set some tags(title, description) after i render a layout. I know how to set the titles via layout files:
<reference name="head"> <action method="setTitle" translate="title"><title>Your Title</title></action> </reference>
or via code by accessing head block element and calling setTitle('your title') method on it
but i need the titles to be dynamically fetched from an item from a collection.
If i go with the controller approach i will be loading the same element twice since i need to load the product to get the fields to set them as Title and Description and again in the block to show it in the product page.
Is it wise to save it with
Should i create the entire layout programatically and assign the data with