html - document.write javascript function is not working -


i'm trying use document.write javascript function set external css file in template, but, want via twig this:

document.write('<link href="{{ asset('bundles/activos/css/app-orange.css') }}" rel="stylesheet" >'); 

but not work. why document.write function not working? can put twig code in there?

or best way pass css route twig document.write javascript function?

sorry if english not good. hope understand. thanks.

try this

{% stylesheets     "@activosbundle/resources/public/css/app-orange.css"     "%kerner.root_dir%/resources/css/main.css" %} <link type="text/css" rel="stylesheet" media="all" href="{{ asset_url }}" /> {% endstylesheets %} 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -