1

We insert an (own) widget to a CMS page using the button.

There is no prompt for the template. Is it possible to choose the template in the Widget insertion GUI for CMS content or does this have to be done manually in the source-code view?

2

You have to specify the list of available templates for the widget. Here is how it's done for the new products widget in catalog module (see my comments inline):

<template>
    <required>1</required>
    <visible>1</visible>
    <label>Template</label>
    <type>select</type>
    <value>catalog/product/widget/new/content/new_grid.phtml</value><!-- default value -->
    <values> <!-- possible values -->
        <default translate="label"><!-- key name -->
            <value>catalog/product/widget/new/content/new_grid.phtml</value><!-- template name -->
            <label>New Products Grid Template</label><!-- label show in selector -->
        </default>
        <list translate="label">
            <value>catalog/product/widget/new/content/new_list.phtml</value>
            <label>New Products List Template</label>
        </list>
    </values>
</template>

[EDIT]
For the <values> field you can even specify a source model (just like you do for system -> configuration dorpdowns).

<values>
    <source_model>adminhtml/system_config_source_yesno</source_model><!-- for a yes/no field-->
</values>
1
  • 1
    Great - what I was missing were the nodes: <template translate="label"> <label>Template</label> <visible>1</visible> <required>1</required> <type>select</type> </template> Without those the template can be chosen at widget instances, but not in the CMS.
    – Alex
    Jul 2 '13 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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