So I have a few custom widgets instances that I'd like to include into some theme .xml files. However I'd like these to be added via XML rather than as Layout Updates under New Widget Instance.

I know I can add a widget via XML by also setting all the widget options within the XML, however i'd like to give the client some ability to configure these in the backend themselves.

At the moment the only way I can think of to add a static block and then have a widget added withint the content of that, but this seems a rather unelagant solution compared with just adding a widget instace directly.

Looking for something like below but for a widget rather than a static block

<block type="cms/block" name="cms_footer_links" before="footer_links">
                <action method="setBlockId"><block_id>footer_links</block_id</action>

2 Answers 2


Here an example of adding New Products widgets via catalog.xml (or any other file) layout:

  type="catalog/product_widget_new" name="custom_widget_name"
    <!-- populate widget by options -->
    <action method="setData"><name>products_count</name><value>3</value></action>
    <action method="setData"><name>cache_lifetime</name><value>3600</value></action>

Looks like what I was asking for isn't possible (by default atleast) so I either need to choose to add the widget (and add the values) via XML, or just use a backend widget instance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.