2017-09-18 6 views
1

私はunclecheese/dashboardモジュールを使用しています。READMEに記載されているように使用します。これはDashboardMostActiveUsersPanel.ssSilverstripe unclecheese/dashboardモジュールでテンプレートが見つかりません

[ユーザーの警告]以下のテンプレートのどれもが見つかりませんでした(使用中の無 テーマ):私は、私は、このエラーメッセージが表示されますsilverstripe 3.5.3

を使用しますパネルコンテンツ:

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私はCMSのバックエンドにテーマを設定し、私もしようとした

SSViewer: 
    theme: 'my-theme' 

のように私は config.ymlでそれを設定し、空

Config::inst()->get('SSViewer', 'theme_enabled‘) 

ですテンプレートを/ themesディレクトリの異なるフォルダに置きます。しかし、まだ運がない。どんな援助が足りないのか非常に高く評価されます。

答えて

6

テーマはフロントエンドにのみ影響します。バックエンドはそれらを使用しません。 mysite/ディレクトリに、または$projectが何であれ、テンプレートを置く必要があります。

+0

_/mysite/templates/_の代わりに_/themes/_フォルダに "default"またはCMSテンプレートを追加する可能性はありますか? – wmk

関連する問題