MINOR: Improve robustness of some of the widget definition

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65190 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-11-04 02:21:09 +00:00
parent 572f6728fb
commit fab14c4b18
2 changed files with 5 additions and 2 deletions

View File

@ -7,9 +7,12 @@
*/
class Widget extends DataObject {
static $db = array(
"ParentID" => "Int",
"Sort" => "Int"
);
static $has_one = array(
"Parent" => "WidgetArea",
);
static $default_sort = "Sort";

View File

@ -12,7 +12,7 @@ class WidgetArea extends DataObject {
);
function forTemplate() {
return $this->renderWith("WidgetArea");
return $this->renderWith($this->class);
}
}