Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

Side Report doesn't show up


Go to End


3 Posts   1056 Views

Avatar
suntrop

Community Member, 141 Posts

30 July 2013 at 8:02am

I want to create a report to get some specific pages. I just copied the code from http://doc.silverstripe.org/framework/en/reference/site-reports into a file CustomSideReport.php and put it into the code folder. But there is no report with my title there. Just the default reports.

<?php

class CustomSideReport_Test extends SideReport {
    public function title() {
        return "Test Report";
    }
     
    public function records() {
        return Page::get()->sort("Title");
    }
     
    public function fieldsToShow() {
        return array(
            "Title" => array("NestedTitle", array("2")),
        );
    }   
}
?>

Avatar
Willr

Forum Moderator, 5523 Posts

11 August 2013 at 6:39pm

This in 3.0, 2.4 or 3.1? 3.* side reports got ditched for just general reports.

Avatar
suntrop

Community Member, 141 Posts

12 August 2013 at 4:58am

Thanks for your answer! I am using 3.0.5. What do you mean by "general reports"? Is the code, I linked in my question, outdated?