Jump to:

5554 Posts in 1742 Topics by 1227 members

Customising the CMS

SilverStripe Forums » Customising the CMS » LeftAndMain - actions cuasing site error

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

Page: 1
Go to End
Author Topic: 458 Views
  • Futureweb
    Community Member
    233 Posts

    LeftAndMain - actions cuasing site error Link to this post


    So, I'm extending the leftandmain class to make a custom CMS section, and running into one problem:

    class MyAdmin extends LeftAndMain {
       static $allowed_actions = array ('show');

    in the left side i have links to 'admin/myadmin/show/$id', and i have enabled the show action.

    if i created a function:

    function show() {
       $ID = Director::$this->request->param('ID');
       return "hello i'm object id $ID";

    when i add in the following function it works, but the screen is blank apart from the line - as expected.
    however, if i don't include this 'show' function silverstripe gives me a server error "Sorry, there was a problem with handling your request."...
    in the error log it's saying 'singleton() Called without a class'

    so i guess - do i need the 'show' function? how can i just pass back returned data to the myadmin/ page - as i would outside of the CMS...


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.