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

PHP while loop dynamic rowspan -

timer - Java TimerTask cancel -

android - How to read a column value in parse.com without accessing an object or a pointer -