I've noticed that if you create a widget instance, then add a layout update, if you choose to add a widget instance to a single page, say cms_index_index, the next time you edit the widget instance, the block reference list only includes the blocks in default. If you wish to save a change you have to select a difference page, then change it back to re-populate the block drop down with the correct value for that page.
I've been routing around the blocks and templates for the last 20mins look for a solution. I seem to be getting some success by editing Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Main_Layout::getDisplayOnContainers
and doing $container['pages'] = $this->getPageGroups()
before returning the $container
array. This seems to ensure that when getDisplayOnContainers
is called in the template, the required handles are present on the page for the current instance. I've not had enough time to dive deep enough into this to see if there are any repercussions however.
Does anybody else have any experience with this issue?
P.s. Has anybody reviewed any of this functionality in Magento 2. I've not had enough free time to look, but I'm kind of hoping they'll go a step further and allow developers to add their own 'page types'.
cms_index_index
page that are not available indefault
? Can you give an example?<label>
in your layout update handle in a declared layout file and ensure that handle is applied on your page.