function updateSettingsFields(FieldList $fields)
 {
     if ($this->owner->hasMethod('getHowToMakeThisTemplateWorkArray')) {
         $array = $this->owner->getHowToMakeThisTemplateWorkArray();
         if (is_array($array) && count($array)) {
             $fields->addFieldToTab("Root.Help", new LiteralField("HowToMakeThisPageWork", '<h3 id="HowToMakeThisPageWorkHeader">' . _t("TemplateOverviewPageDecorator.HOWTOMAKEITWORKHEADER", "How to make this page work") . '</h3>' . '<ul id="HowToMakeThisPageWorkList"><li>' . implode("</li><li>", $array) . '</li></ul>'));
         }
     }
     $obj = TemplateOverviewDescription::get()->filter(array("ClassNameLink" => $this->owner->ClassName))->First();
     if ($obj) {
         $fields->addFieldToTab("Root.Help", new LiteralField("MoreHelp", $obj->renderWith("TemplateOverviewPageCMSDetail")));
     }
 }
 function TemplateDescriptionForThisClass()
 {
     return TemplateOverviewDescription::get()->filter(array("ClassNameLink" => $this->owner->ClassName))->First();
 }
 function showmore($request)
 {
     $id = $request->param("ID");
     $obj = SiteTree::get()->byID(intval($id));
     if ($obj) {
         $className = $obj->ClassName;
         $data = $className::get()->filter(array("ClassName" => $obj->ClassName))->limit(200);
         $array = array("Results" => $data, "MoreDetail" => TemplateOverviewDescription::get()->filter(array("ClassNameLink" => $obj->ClassName))->First());
     } else {
         $array = array();
     }
     return $this->customise($array)->renderWith("TemplateOverviewPageShowMoreList");
 }
 public function validate()
 {
     if ($this->ID) {
         if (TemplateOverviewDescription::get()->filter(array("ClassNameLink" => $this->ClassNameLink))->exclude(array("ID" => $this->ID))) {
             return new ValidationResult(false, _t("TemplateOverviewDescription.ALREADYEXISTS", "This template already exists"));
         }
     }
     return new ValidationResult();
 }