21289 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 933 Views |
-
Blog Sidebar goes Missing, WHERES IT GONE?

18 December 2009 at 1:19am
I followed the instructions @ http://doc.silverstripe.org/doku.php?id=widgets on how to install a widget on other pages. So in page.php I changed:
...............................................................................................
class Page extends SiteTree {
public static $db = array(
);
public static $has_one = array(
);
}
...............................................................................................to
...............................................................................................
class Page extends SiteTree {
public static $db = array(
);
static $has_one = array(
"Sidebar" => "WidgetArea",
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Widgets", new WidgetAreaEditor("Sidebar"));
return $fields;
}
}
...............................................................................................This works and I am able to add widgets on pages by using $Sidebar but the blog widgets have now dissapeared? Any ideas anyone?
| 933 Views | ||
|
Page:
1
|
Go to Top |

