Phil Sturgeon のテンプレート ライブラリを使用しています。モジュールも使用しています。
モジュールのブログは、追加した場合にのみ機能します
$this->template->set_theme('nvc');
$this->template->set_layout('theme');
しかし、私はそれを望んでいません。コアファイルに設定したいのです。これを修正するにはどうすればよいですか?
モジュールのウェルカムは完全に機能します
class Welcome extends NVC_Controller {
function index()
{
$this->template->build('theme');
}
}
しかし、モジュールのブログではエラーが発生します (テンプレート):
要求されたファイルを読み込めません: default.php
class Blog extends NVC_Controller {
var $num = 10;
function __construct()
{
$this->load->model('blog_model', 'blog');
}
function index()
{
$data["result"] = $this->blog->get_all_posts($this->num);
$this->template->build('blog', $data);
}
}
コア/NVC_Controller.php
class NVC_Controller extends MX_Controller {
function __construct(){
if(nvc_site_open()){
$this->template->set_theme('nvc');
$this->template->set_layout('theme');
} else {
show_error("De site is momenteel gesloten.");
}
}
}
何がうまくいかないのですか?構成レイアウトを「テーマ」に設定しても機能しません。テンプレートは に保存されapplication/themes/nvc/views/layouts/theme.php
ます。