[eluser]Ram2810[/eluser]
Hi everyone am unable to get results that are stated in userguide of the template pls some do help me
The code files are as follows , the library,views,config are all same as downloaded i will paste here the controller page code and view page code... hope some one will help me...
views/page_view.php[b]
Code:
<html>
<head>
<title><?= $title ?></title>
<link rel="stylesheet" type="text/css" href="main.css" />
</head>
<body>
<div id="wrapper">
<div id="header">
<?= $header ?>
</div>
<div id="main">
<div id="content">
<h2><?= $title ?></h2>
<div class="post">
<?= $content ?>
</div>
</div>
<div id="sidebar">
<?= $sidebar ?>
</div>
</div>
<div id="footer">
<?= $footer ?>
</div>
</div>
</body>
</html>
[b]controller/page.php
Code:
<?php
class Page extends Controller {
function Page()
{
parent::Controller();
}
function index()
{
$this->template->write('title','page_view','Introduction to Template');
$this->template->write_view('header', 'page_view',$this->template);
$this->template->write_view('content', 'page_view',$this->template);
$this->template->render();
}
}
?>
THE REGIONS CODE AS IN TEMPLATE.PHP IS AS FOLLOWS
Code:
$template['default']['template'] = 'template';
$template['default']['regions'] = array(
'title',
'content',
);
$template['default']['regions']['header'] = array('content' => array('<h1>CI Rocks!</h1>'));
$template['default']['regions']['footer'] = array('content' => array('<p id="copyright">© Our Company Inc.</p>'));
$template['default']['parser'] = 'parser';
$template['default']['parser_method'] = 'parse';
$template['default']['parse_template'] = TRUE;
when i call the page controller i am getting a blank page ,with no title or content anything...
Pls do guide me here
Thank you