Jump to:

3429 Posts in 1057 Topics by 734 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Multiple actions per page

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

Page: 1
Go to End
Author Topic: 1052 Views
  • Mo
    Avatar
    Community Member
    504 Posts

    Multiple actions per page Link to this post

    Hi All,

    Sorry if my naming is a bit inaccurate, I am terrible with names :s.

    If I have a page with multiple actions (please correct me if these are not called actions, but something else), for example:

    http://siteaddress.com/page/
    http://siteaddress.com/page/action1/
    http://siteaddress.com/page/action2/

    I know that I can create templates for "action1" and "action2" as files:

    page_action1.ss
    page_action2.ss

    But where do I put my php code for those actions? Are these represented by methods in page_controller? Or do i need to do something else?

    Sorry for the noob question . I cant find anything about this in the documentation, so if anyone has a link, that would be great.

    Cheers,

    Mo

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Multiple actions per page Link to this post

    Hi Mo

    You are right about the php-code and actions. Actions should be methods of the Controller class.
    Maybe this provides some – albeit sparse – insight:
    http://doc.silverstripe.com/doku.php?id=execution-pipeline

  • Mo
    Avatar
    Community Member
    504 Posts

    Re: Multiple actions per page Link to this post

    Yep, your right about sparse .

    That is what I was looking for though. I have been trying to find that for ages.

    Cheers!

  • Mo
    Avatar
    Community Member
    504 Posts

    Re: Multiple actions per page Link to this post

    Does anyone know if there is any more detailed documentation on this?

    1052 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.