Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

Extend UserForm - Page.ss not being used


Reply


1104 Views

Avatar
Double-A-Ron

Community Member, 604 Posts

9 January 2011 at 3:58pm

Edited: 09/01/2011 4:00pm

SS - 2.4.4
UF - 0.3.0

I want to make a custom page from UserDefinedForm called ContactPage, so I can mess around with the layout without affecting future forms. I have done this as follows by creating ContactPage.php in mysite (not the userforms directory):

class ContactPage extends UserDefinedForm {

   public static $db = array(
   );

   public static $has_one = array(
   );

}
class ContactPage_Controller extends UserDefinedForm_Controller {

   public static $allowed_actions = array (
   );

   public function init() {
      parent::init();

   }
}

dev/build and all seems well in the CMS. So I also make a ContactPage.ss template in /themes/mysite/Layout with some basic HTML.

When I view the new page, it seems that it is not even using the main Page.ss file as a base, let alone my custom sub template. All I see is the content and this line on a blank white page.

Generated with the default ContentController.ss template

Any ideas what I've done wrong here?

Aaron