Welcome Guest, Not a member yet? Register   Sign In
Multiple Dynamic Templates (MySQL)
#1

[eluser]Unknown[/eluser]
Hi,

http://ellislab.com/codeigniter/user-gui...arser.html

How do the code below to load the html template of the database, rather than a php file?
$this->parser->parse('template_name', $data);

Quote:Currently: template_name is view/template_name.php
Change: I want the template_name is the name of the template registered in the database, loading the html database.

Code:
CREATE TABLE `templates` (
  `template_id` int(11) NOT NULL AUTO_INCREMENT,
  `template_name` varchar(100) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `html_template` longtext,
  `css_template` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`template_id`),
  UNIQUE KEY `key` (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

I searched some Template Engine, but have not found any idea of loading the html database.
http://codeigniter.com/wiki/Category:Lib...te_Engine/

My main objective:
I want to develop a system of multiple templates for the same site. But I want to be in the database, to allow a user to edit the html as he wants, and save records a copy of this html code into a new record in the database with your user id, allowing him to leave the site the look he desired.

Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB