Welcome Guest, Not a member yet? Register   Sign In
Template Library 1.4.x Cant resolve a problem with template including
#1

[eluser]tzi0[/eluser]
Hi guys. Great stuff Wink But..
I have a main and default template file, named main.php (views/main.php). It has 3 simple regions: header, footer,title and content.
I have a feedback view (views/feedback.php). It must be included in my content region of main template like $this->tempalte->write_view("content","feedback",true).
Ok. In my feedback view i have an expression like <?php echo $mystring ?>. How to pass $mystring from main template without accenting my attention to views? I mean i wnar to use Template library only.
Now, i do it like that:

Code:
this->template->write("title","Feedback",true);
$data["mystring"] = "Hello it's me";
//i want not to use that:
$rendered_feedback  = $this->load->view("feedback",$data,true);
        
$this->template->write("content",$rendered_feedback);
$this->template->render();
#2

[eluser]tzi0[/eluser]
There is no way?




Theme © iAndrew 2016 - Forum software by © MyBB