So, i set up the blog module to manage my news entries on the frontpage.
i created my own template with a fixed sidebar defined in the Page.ss template file.
i now want to move all the widgets from the blog into this sidebar section and only displaying them on the blog page or entries of the blog. (i dont want the archive box be displayed on the "about-us" page for example)
so i tried to follow this small tutorial: http://doc.silverstripe.org/doku.php?id=widgets#adding_widgets_to_other_pages
and my page.php file looked in this section like this:
<?php
class Page extends SiteTree {
public static $db = array(
);
public static $has_one = array(
"Sidebar" => "WidgetArea"
);
function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->addFieldToTab("blog.Widget.ArchiveWidget", new WidgetAreaEditor("Sidebar"));
return $fields;
}
}
...
And unfortunately this doesnt work. My site throws an Website error and i have not the slightest idea how to solve this.
Where do i learn which path to use for a widget i want to include? The tutorial says "Root.Content.Widgets" but where are these packages?
Do i have to use the term "Sidebar"? And why does the authore make use of the term "Sidebar" and calling the object with $SideBar in the template? Isn't Silverstripe case-sensitive?
Can i use any term for this? for example could i just write "Area-to-put-all-the-blog-widgets-in" instead of "Sidebar" ? Or is it connected in some ways to other parts of the template?