Hello everybody.
Must Say Like the new styling. But not here to comment on that.
I'm designing a site with SilverStripe. Been busy for ages but just learning SS and PHP.
It's a bit different from plain HTML. But almost finished my first site.
Solved all I encountered except the part of the Widgets. Can't seem to get it working.
And I have no clue anymore.
Followed the instructions and changed the /mysite/code/Page.PHP as below
<?php
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;
}
*******
Also changed in Themes/mytheme/template/includes/SideBar.ss
The last lines to include the Widgets in the sidebar like this
<div class="clear"></div>
</div>
<div class="sidebarBottom">
$SideBar
</div>
</div>
********
Finally I like to mention that I changed the /templates/Layout/page.ss
to include the side bar at any given moment and not just when a menu is present. I did this by removing the "If" statement like this
<div class="typography">
<% include SideBar %>
<div id="Content">
<% if Level(2) %>
<% include BreadCrumbs %>
<% end_if %>
$Content
$Form
$PageComments
<% if Menu(2) %>
</div>
<% end_if %>
</div>
**********
That is all I did and I included several widget's but in the CMS the installed Widgets all give the error of "Bad widget class name given". While the Blog Widgets do seem to Work.
I'm developing directly on the server so but with the Blog Widgets working I still have no clue what is not working. I am a Newbe so please let any comment given be at my level of understanding. But than again any reaction is welcome.