Hi Will,
I have tried following the instructions from the doku page:
http://doc.silverstripe.org/doku.php?id=widgets#adding_widgets_to_other_pages
This ends up duplicating the Available Widgets section on the Widgets tab in the CMS.
The original Page.php had the following:
class Page extends SiteTree {
public static $db = array(
);
public static $has_one = array(
);
}
Applying the instructions, the above now looks like this:
class Page extends SiteTree {
public static $db = array(
);
public static $has_one = array(
"Sidebar" => "WidgetArea",
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Widgets", new WidgetAreaEditor("Sidebar"));
return $fields;
}
}
What am I doing wrong?
Can you please advise.
Thanks
Mauricio