我正在使用unclecheese/dashboard模块我使用它就像在README中描述的那样.我使用silverstripe 3.5.3
我收到此错误消息:
[用户警告]找不到以下模板(未使用主题):DashboardMostActiveUsersPanel.ss
这是面板内容:
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();
}
}
Run Code Online (Sandbox Code Playgroud)
这是模板:
<div class="dashboard-recent-orders">
<ul>
<% loop $MostActiveMembers %>
<li>$Name, $Activity</li>
<% end_loop %>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
这是错误的来源:theme_enabled是空的
Config::inst()->get('SSViewer', 'theme_enabled‘)
Run Code Online (Sandbox Code Playgroud)
我设置了主题在CMS后台,我把它在config.yml像
SSViewer:
theme: 'my-theme'
Run Code Online (Sandbox Code Playgroud)
我还尝试将模板放在/ themes目录中的不同文件夹中.但仍然没有运气.我错过了什么帮助将非常感谢.
| 归档时间: |
|
| 查看次数: |
117 次 |
| 最近记录: |