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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

Side Report doesn't show up


Go to End


3 Posts   796 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?