Welcome Guest, Not a member yet? Register   Sign In
What is the best way to implement the Asset Helper?
#3

[eluser]timpiele[/eluser]
I do have an asset directory, maybe I should be more clear:

Since my CSS and JavaScript files are referenced in my header, which is a partial view, what is the best way to only have to reference them once for that partial?

Every time a view is loaded the header is there, and it has

Code:
<?=$css_bootstrap;?>

then I have to pass a value to that variable from every controller, otherwise it is undefined...

Maybe just create one file with all of the asset calls and use include() at the top of my header? I hate to do that as I am trying to keep views clear of PHP...


Messages In This Thread
What is the best way to implement the Asset Helper? - by El Forum - 06-02-2013, 02:14 PM
What is the best way to implement the Asset Helper? - by El Forum - 06-02-2013, 02:50 PM
What is the best way to implement the Asset Helper? - by El Forum - 06-02-2013, 03:33 PM
What is the best way to implement the Asset Helper? - by El Forum - 06-03-2013, 01:29 AM
What is the best way to implement the Asset Helper? - by El Forum - 06-03-2013, 09:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB