[eluser]@Frédéric Quié - bleekom.org[/eluser]
Hi Collin,
You did a great job, but I suggest you to update your user guide to make the implementation of the Template Library clearer for the newbies, it will improve the use of it.
First change :
(For the sake of brevity, this example will be poorly structured HTML and make use of PHP short tags.)
If you use PHP4 it's perfect, but for PHP5 with no short tags turned on on CI, a better example would be, to include regions, with an
echo statement :
Code:
<html>
<head>
<title><?php echo $title; ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>includes/css/template.css"/>
</head>
<body class="twoColHybRtHdr">
<div id="container">
<div id="header">
<?php echo $header; ?>
</div>
<div id="wrapper">
<div id="sidebar">
<?php echo $sidebar; ?>
</div>
<div id="content">
<h2><?php echo $title; ?></h2>
<div class="post">
<?php echo $content; ?>
</div>
</div>
</div>
<br class="clearfloat" />
<div id="footer">
<?php echo $footer; ?>
</div>
</div>
</body>
</html>
Second change :
You should also mention one has to put in his construct controller the loading of the 'parser' library before your 'Template' library if we use by default the 'parser' library of CI :
Code:
function Page()
{
parent::Controller();
$this->load->library('parser');
$this->load->library('Template');
}
Cheers !!!