Jump to:

5541 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Creating a custom controller

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

Page: 1
Go to End
Author Topic: 2018 Views
  • tilluigi
    Avatar
    Community Member
    9 Posts

    Creating a custom controller Link to this post

    hi,

    i am trying to extend a site based on the tutorial-installation and have a problem trying to create a custom controller to bypass all the Page-Object stuff. Basically, the controller should generate HTML for a slideshow based on images added to a Page via the "hasmanyfiles" module.

    i am following this part of the Doku:
    http://doc.silverstripe.org/doku.php?id=controller

    but even if i add the exact same files as in the example, i get an error saying:

    Fatal error: Class 'FastFood_Controller' not found in /var/www/html/silver/sapphire/core/control/Director.php on line 202

    How do I make sapphire find my controller?

  • tilluigi
    Avatar
    Community Member
    9 Posts

    Re: Creating a custom controller Link to this post

    oh my, i just used ?flush=1 and now it works. blame me!

  • Richie
    Avatar
    Community Member
    18 Posts

    Re: Creating a custom controller Link to this post

    I you (like me!) could not retrieve these vars, use:
    $getID = Director::urlParam('ID'); // argument ID

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