I had a problem implementing my CMS using Codeigniter 1.7.2 and Dwoo. I am using the Phil Sturgeon Dwoo library. My problem is that I want the user to create a template from the admin panel, which means that all templates will be saved in the database, including all variables and Dwoo functions. My questions:
- Can I load a dwoo template from a database?
- How to parse a dwoo variable or function from a database? I tried loading content from a database that includes dwoo var and a function inside it, and I tried to evaluate using the dwoo function
eval()and phil sturgeon string_parse(), but still no luck.
, eg:
my controller
$data['header'] = "<h1>{$header}</h1>"; --> this could be loaded from database
$this->parser->parse('header',$data);
my opinion
{$header}
This error message is:
<h4>A PHP Error was encountered</h4>
<p>Severity: Notice</p>
<p>Message: Undefined index: header_title</p>
<p>Filename: compiled/805659ab5e619e094cac7deb9c8cbfb5.d17.php</p>
<p>Line Number: 11</p>
header_title - dwoo, .
,