Jump to:

22977 Posts in 11806 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » How to maintain page scope when rendering a custom template?

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 827 Views
  • sonet
    Avatar
    Community Member
    33 Posts

    How to maintain page scope when rendering a custom template? Link to this post

    How to maintain the page scope when rendering a custom template for instance:

       function SignupForm() {
          $formSignup = new Form($this, "SignupForm", new FieldSet(
                new EmailField("Email", "","E-Mail Address")),
                new FieldSet(new FormAction("SignupAction", "Sign up")),
                new RequiredFields("Email")
             );
          return $this->customise($formSignup)->renderWith(array('FormSignup'));
       }

    I'm trying to render this form with a simplified template. The code above returns the form only (instead of inserting it into Page.ss markup). How can get this function to render Page.ss including my FormSignup.ss?

    827 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.