I am sure others have had the same question as me without wanting to appear ignorant enough to ask it. I will play that role today.
Would someone please tell me how to install an editable widget tab on normal pages in the CMS. The instructions (http://doc.silverstripe.org/doku.php?id=widgets&s=widgets) are totally ambiguous because after following them exactly--still no editable widget tab in my CMS.
1) First, I unpacked several widgets along with the blog module. Dev/Build went successfully. (I'm using the 'dreamy' theme, by the way.)
2) Next, per the documentation, I added the exact code to /public_html/mysite/code/Page.php
<?php
class Page extends SiteTree {
public static $db = array(
);
public static $has_one = array(
);
}
static $has_one = array(
"Sidebar" => "WidgetArea",
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Widgets", new WidgetAreaEditor("Sidebar"));
return $fields;
}
3) Then, and this is where I am confused, I add the $Sidebar to public_html/themes/dreamy/templates/Includes/SideNav.ss
Here's how it looks:
<h3>
<a href="$Link" title="Go to the $Title page" class="$LinkingMode">$MenuTitle</a>
</h3>
<ul>
<% control Children %>
<li><a href="$Link" title="Go to the $Title page" class="$LinkingMode">$MenuTitle</a></li>
<% end_control %>
$Sidebar
</ul>
4) Then, I do a dev/build to check-- Still, no editable tab, which is strange because to the best of my knowledge, I followed the directions.
Could someone please help?
Thanks,
Ian