Thanks so much for your help. So I got to the point where the "add widget" option is showing up in the CMS, and I was able to drag & drop my widget, but got an error message upon trying to save. Then, I logged out, did a db flush, logged back in and now I've still got the add widget tab, but can't drag and drop - in the space where before I could drop a widget, it now says "bad widget class name given". I'm pasting my code below so maybe someone might spot where I'm going wrong. I have no prior experience with PHP, so please forgive me if this turns out to be a simple fix. Nothing's simple for me right now! ack!
Code for /mysite/code/page.php :
<?php
class Page extends SiteTree {
static $db = array(
);
static $has_one = array(
"Sidebar" => "WidgetArea"
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Widgets", new WidgetAreaEditor("Sidebar"));
return $fields;
}
}
class Page_Controller extends ContentController {
function init() {
parent::init();
Requirements::themedCSS("layout");
Requirements::themedCSS("typography");
Requirements::themedCSS("form");
}
}
?>
here's the code for theme/earthling/templates/includes/sidebar.ss :
<% control Level(1) %>
<% if Title = Blog %>
<% else %>
<% if Title = Forums %>
<% else %>
The menu:
* <% control Children %> <% if First %> class="first"<% end_if %>> $MenuTitle
<% end_control %>
<% end_if %>
<% end_if %>
$Sidebar
<% end_control %>