[eluser]timpiele[/eluser]
Generally yes, I have one set of global assets I pass in (other than images)...
For images, I create an $images[] array on a per controller basis and pass that to the view and echo out the images like
Code:
<?=$images['logo'];?>
to keep the code simple.
I generally use bootstrap, font awesome, jQuery and a few other libraries project-wide, so they need to be present in the header. I try to keep complex PHP out of my views because my designer has to work with them and it's easier for him to understand
Code:
<?=$css_bootstrap;?>
in the header rather than
Code:
<?php echo css_asset('bootstrap.css');
My question is, other than hard coding calls to the asset helper in the header, is there an easier way (pattern) that you guys use for this, like putting the asset calls in a file and using include() to place it at the top of each controller's constructor, or even just including it in the header I guess?
You've got this block of like 8-10 calls to asset_helper, used on every page, but you don't want them in your header view file, where do you put them?