-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to add codeigniter function at twig #27
Comments
You don't have to add |
Okay thanks, I got it working. Also I have this issue . I added the widget() method your library as follow: // libraries / Twig.php
.....
public function widget($name){
$this->_widget = '_includes.'$name.'.html';
return $this;
}
// in my controller/home.php
.....
public function index(){
$this->twig->addGlobal->('twig', $this->twig);
......
$this->twig->display('home');
}
// views home.php
{# let's include the header page #}
{% include twig.widget.header %}
{# end #}
............# This is the error I get |
Do you want like this?
|
Yes that's what I was working on. Do you know any idea how to achieve it? Unable to find template "_includes/0.html" (looked into: /home/waptik/public_html/../..app/views/twig). I don't know why it's 0.html and not header.html UPDATE 2: I got it working with this {% include twig.widget('header') %} |
Hi i am using this library but facing a problem while trying to use functions. Question on SO is not mine but i am facing same problem. i have already loaded url and form helpers in my controller.
I hope someone can help.
my error
http://stackoverflow.com/questions/41662788/unable-to-add-codeigniter-function-at-twig (reffered from SO)
The text was updated successfully, but these errors were encountered: