Magento – Custom targets for widget Layout Updates in Magento 2

magento2

I would like help working out how to add a custom container as a 'Layout Update' for a widget..

Currently, I only have the 3 basic options to choose from (Main Content Area, Siderbar Main and Sidebar Additional), but I would like to be able to add widgets to containers that I've created through various default.xml files.

Specifically, I'm trying to include the Recently Viewed widget. I have tried updating module-reports/etc/widget.xml, adding an extra inside the , however that doesn't seem to work..

How can I use a customer container?

Thanks, Luke

Best Answer

As it turns out, the custom container that I had created didn't have a label attribute, so Magento was ignoring it as a possible layout destination