Greetings!
I've been designing a template set on a development installation of mt and I've almost successfully packaged it up ready for deployment to the live website.
I've created a perl package for the plugin based on the one used in the Mid-Century template set and it works lovely except for the widgetsets. Upon refreshing templates, all of the template types are created including the widgets and widgetsets, but the latter are not populated with the desired widgets - no widgets in them at all.
I haven't been able to find an example of defining widgetsets in a package so I've posted my attempt below in the hope that some bright spark will spot the error:
widget => {
'category_nav' => {
label => 'Category Nav',
},
'monthly_nav' => {
label => 'Monthly Nav',
},
'mytweets' => {
label => 'mytweets',
},
'reader' => {
label => 'reader',
},
},
widgetset => {
'archive_links' => {
order => 1000,
label => 'Archive Links',
widget => {
'category_nav',
'monthly_nav',
},
},
'social' => {
order => 1000,
label => 'social',
widget => {
'mytweets',
'reader',
},
},
},
Reported on Movable Type 4.3

It's probably just a minor syntax glitch. The Professional template set(its definition is in YAML but the structures translate) defines widgets plural under the widgetset. Try that.
Thanks Su. I tried the plural widgets under widgetset and got an error whilst refreshing the template:
I too had looked at the YAML definition (which as you say should translate) which I found in the source for Vanilla+Widgets, but no dice there - I'll keep trying stuff, I'm sure I'll get it in the end...
The clue was in the error message and you were right Su - it is the plural widgets and if it's defined as an array, rather than the hash that I defined it as, then it works properly.
One thing I found was that widgets must be an array of widget labels and not simply the names:
widget => { 'category_nav' => { label => 'Category Nav', }, 'monthly_nav' => { label => 'Monthly Nav', }, 'mytweets' => { label => 'mytweets', }, 'reader' => { label => 'reader', }, }, widgetset => { 'archive_links' => { order => 1000, label => 'Archive Links', widgets => [ 'Category Nav', 'Monthly Nav', ], }, 'social' => { order => 1000, label => 'social', widgets => [ 'mytweets', 'reader', ], }, },Thanks for your help.
Hi Jah,
I tried to do it the way you explained but no luck for me
widget => {
'news' => {
label => 'News',
},
'search' => {
label => 'Search',
},
},
wigetset => {
'2_column_layout_sidebar' => {
order => 1000,
label => '2-column layout - Sidebar',
widgets => [
'Search',
'News',
],
},
},
Any specific thing which I missed here? I have defined everything under "registry->templatesets" as it usually done in the YAML.
I would appreciate any help please.
Thanks.
I can't see anything wrong with the syntax - just the typo in the word widgetset (you missed a 'd'). Does the template set work other than adding widgets to the widgetset?