Answer the question
In order to leave comments, you need to log in
How to configure twig to give partial image url in template?
Sent a site template using twig. Image addresses are incomplete, for example img src="images/img1.png". When using mvc kohana, there are problems when displaying images. Is it possible to configure twig in such a way that it finally displays such image addresses on the site in full? I mean like this: http: //site.ru/site/images/img1.png.
Answer the question
In order to leave comments, you need to log in
I had a project, there was Kohana 3.2 and twig - 1.16, it seems.
I connected assets in a similar way:
The url_site function was registered in my extension like this:
That's it.
UPD. If you are too lazy, you can do this - htmlbook.ru/html/base , but this will affect all links.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question