Reputation: 275
I'm using unclecheese/dashboard module i use it like it is described in the README. I use silverstripe 3.5.3
I get this error message:
[User Warning] None of the following templates could be found (no theme in use): DashboardMostActiveUsersPanel.ss
this is the panel content:
class DashboardMostActiveUsersPanel extends DashboardPanel{
private static $db = array (
'Count' => 'Int',
);
public function getLabel() {
return 'Most Active Users';
}
public function getDescription() {
return 'Shows the most active Users.';
}
public function getConfiguration() {
$fields = parent::getConfiguration();
$fields->push(TextField::create("Count", "Number of users to show"));
return $fields;
}
public function getMostActiveMembers() {
$members = Member::get()->sort("Activity DESC")->limit($this->Count);
return $members;
}
public function PanelHolder() {
return parent::PanelHolder();
}
}
this is the template:
<div class="dashboard-recent-orders">
<ul>
<% loop $MostActiveMembers %>
<li>$Name, $Activity</li>
<% end_loop %>
</ul>
</div>
This is where the error comes from: theme_enabled
is empty
Config::inst()->get('SSViewer', 'theme_enabled‘)
I set the theme in the CMS Backend and i set it in config.yml
like
SSViewer:
theme: 'my-theme'
I also tried to put the templates in different folders in /themes directory. But still no luck. What am i missing any help would be highly appreciated.
Upvotes: 1
Views: 157
Reputation: 1584
Themes only affect the frontend. The backend does not use them. You'll need to put the template in your mysite/
directory, or whatever your $project
is.
Upvotes: 6