Advertisement
Guest User

Untitled

a guest
Jan 8th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. Silverstripe form redirection question
  2.  
  3. As far as I can see, there are two options here:
  4.  
  5. A: Programmatically Create a Page
  6.  
  7. 1. Render a page when the form is successfully completed (and email had been sent)
  8. 2. Page should not be included in the sitetree, or be accessible by anything other than a successful form submission – typing the URL should redirect back to the contact page.
  9.  
  10. B: Limit Functionality of a Sitetree Page
  11.  
  12. 1. Create a new page type for form success
  13. 2. Page should not be accessible via menus, search or by typing the URL – typing in the URL should redirect back to the contact page.
  14.  
  15. (A) Has the advantage of possibly hooking into the routing rules meaning we can utilise a single class for rendering multiple ‘thank you’ pages without things getting messy in the routing rules.
  16. (B) Has the advantage of content being editable in the same way as other standard pages.
  17.  
  18. I’m happy to go with either, but it depends on the complexity of the solutions using Silverstripe...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement