philsturgeon / codeigniter-template

Template library for CodeIgniter which supports modules, themes, partial views, etc.
411 stars 178 forks source link

Can set_partial set the third param(data) for the partial view? #32

Open lucky9805 opened 12 years ago

lucky9805 commented 12 years ago

I can't set the third param "data" for the partial view

I have a view named :test.php to used for partial. --------------------test.php------------------- <?php echo $show_param; ?> --------------------test.php-------------------

I write the controller to use $data["show_param"]="hello the world"; $this->template->set_partial('test','test',$data); $this->template->set_layout('default'); $this->template->build('aaa'); But the result I couldn't get the $show_param to echo.

How can I use the set_partial?

FDiskas commented 11 years ago

Try to set in template config file $config['parser_enabled'] = FALSE; or try this pull request: https://github.com/philsturgeon/codeigniter-template/pull/43