O
O
opensuse20082017-09-24 17:03:07
Kohana
opensuse2008, 2017-09-24 17:03:07

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

1 answer(s)
A
Alexander Kuznetsov, 2017-09-24
@DarkRaven

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 question

Ask a Question

731 491 924 answers to any question