Reputation: 1177
I'm trying to render a widget instance with a custom template. In the admin, in my CMS Homepage, in the Layout Updates XML section I've added the following code:
<reference name="right.hp_right_hot_items">
<block type="mih_banner/widget_banner" template="banner/widget/block-right.phtml"/>
</reference>
where 'hp_right_hot_items' is the Widget Instance Title, but for some reason the template is not set properly.
In the widget instance fronted properties I've set a layout update:
Display On: Specific Page
Page: CMS Home Page
Block Reference: Right Column
Template: Banner Block Template
Any ideas?
Upvotes: 1
Views: 6633
Reputation: 1177
In order to render a widget with a custom template you have to do the following:
<parameters> <template> <values> <block_right translate="label"> <value>{path_to}/yourfile.phtml</value> <label>Banner Block Template {custom name}</label> </block_right> </values> </template> </parameters>
Now, when you go to admin to add another widget instance, in the layout updates section you should be able to select the template just added.
Upvotes: 3
Reputation: 1494
To set template for block try following action
<reference name="right.hp_right_hot_items">
<action method="setTemplate">
<template>banner/widget/block-right.phtml</template>
</action>
</reference>
Upvotes: 0