CodeIgniter Forums
parse template in view codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: parse template in view codeigniter (/showthread.php?tid=66558)



parse template in view codeigniter - neuron - 11-04-2016

I am new to Codeigniter. I created a template for form and want to parse it within view file. It is parsing but it echos parsed form on the top of the page, not where I want. I am not using template for whole page. I want to render peace of page using parser. Here is my parser:


PHP Code:
<form action = {action}>

<
select name = {input_name}>
 
   {options}
 
       <option value = {val}>{name}</option>
 
   {/options}

</
select
And I called this template from my view.php using this function:

PHP Code:
$this->parser->parse('form_templates/vehicle_category.php'$form_data);