[eluser]7amza[/eluser]
hey
i have a problem using phil template library and dwoo template parser(with phil modifications) :
my controller:
Code:
function index()
{
//setting
$setting = new setting();
$setting->get();
$categories = new category();
$categories->get();
//pages
$data['pages'] = new page();
$data['pages']->get();
//blocks
$data['blocks'] = new block();
$data['blocks']->get();
//articles
$data['articles'] = new article();
$data['articles']->get(3);
//sites
$data['sites'] = new site();
$data['ok'] = 'oooo';
$this->template->set_theme('default');
$this->template->set_layout('default');
$this->template->set_partial('header','header',array($data));
//get title of page
$this->template->title($setting->getField('title'),'الصفحة الرئيسية');
//build the template
$this->template->build('home',array($data));
//$this->load->view('menu',$data);
//$this->load->view(getCurrentStyle().'home',$data);
//$this->load->view('footer',$data);
}
my themes/default/views/header.php file :
Code:
{doctype('xhtml1-trans')}
<html dir='rtl'>
<title>title</title>
{link_tag(assets/css/main.css)}
{link_tag("assets/css/green.css")};
<body>
<div id="wrapper">
<div id="header">
{anchor(base_url(),"<h1></h1>")}
<div class="ads"><a href="http://www.rasoulallah.net/" title="إعلانات الموقع">
<embed src="http://www.elsaqqa.com/ads.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#000000" height="60" width="100%" />
</a>
</div>
<div class="clear"></div>
<div class="navbar">
<ul>
</ul>
</div>
</div>
<div class="clear"></div>
<div id="main">
{$setting->title}
Quote:i got this error:
Severity: Notice
Message: Undefined index: setting
Filename: compiled/ad78c50822f4da920cb18a6dd310013b.d17.php
Line Number: 29
thanks ,