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.

Customising the CMS

Side Report doesn't show up


Reply

3 Posts   365 Views

Avatar
suntrop

30 July 2013 at 8:02am Community Member, 131 Posts

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

11 August 2013 at 6:39pm Forum Moderator, 5511 Posts

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

Avatar
suntrop

12 August 2013 at 4:58am Community Member, 131 Posts

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?