Closed xQuByte closed 8 years ago
Yes, you can call display()
only once.
If you want to have more than one templates, you can do like this:
https://github.com/kenjis/codeigniter-tettei-apps/blob/develop/application/views/shop_tmpl_shop.twig
See Twig documentation: http://twig.sensiolabs.org/doc/templates.html#including-other-templates
Or you can get the output string with using rendar()
method.
$output = $this->twig->render('welcome', $data);
Thank you for your reply.
I always use this same header and footer so in every view i use
{% include 'include/Header.twig' %}
{# content #}
{% include 'include/Footer.twig' %}
Hi! I want to display Header, content and footer. When I use:
$this->twig->display('Header');
Everythink works perfectly, but when i write below$this->twig->display('Footer');
i can see only footer etc.I can see only last display in function.