Silverstripe unclecheese/dashboard 模块未找到模板
Silverstripe unclecheese/dashboard module does not find template
我正在使用 unclecheese/dashboard 模块,我按照自述文件中的描述使用它。我用 silverstripe 3.5.3
我收到此错误消息:
[User Warning] None of the following templates could be found (no
theme in use): 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();
}
}
这是模板:
<div class="dashboard-recent-orders">
<ul>
<% loop $MostActiveMembers %>
<li>$Name, $Activity</li>
<% end_loop %>
</ul>
</div>
这是错误的来源:theme_enabled
为空
Config::inst()->get('SSViewer', 'theme_enabled‘)
我在 CMS 后端设置了主题,我在 config.yml
中设置了它,比如
SSViewer:
theme: 'my-theme'
我也试过将模板放在/themes 目录下的不同文件夹中。但仍然没有运气。我错过了什么帮助将不胜感激。
主题只影响前端。后端不使用它们。您需要将模板放在您的 mysite/
目录中,或者您的 $project
目录中。
我正在使用 unclecheese/dashboard 模块,我按照自述文件中的描述使用它。我用 silverstripe 3.5.3
我收到此错误消息:
[User Warning] None of the following templates could be found (no theme in use): 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();
}
}
这是模板:
<div class="dashboard-recent-orders">
<ul>
<% loop $MostActiveMembers %>
<li>$Name, $Activity</li>
<% end_loop %>
</ul>
</div>
这是错误的来源:theme_enabled
为空
Config::inst()->get('SSViewer', 'theme_enabled‘)
我在 CMS 后端设置了主题,我在 config.yml
中设置了它,比如
SSViewer:
theme: 'my-theme'
我也试过将模板放在/themes 目录下的不同文件夹中。但仍然没有运气。我错过了什么帮助将不胜感激。
主题只影响前端。后端不使用它们。您需要将模板放在您的 mysite/
目录中,或者您的 $project
目录中。