Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Question: Asset queuing
  • Does the asset class have anything currently available for "queuing" the load of the assets? An example of this, is to be able to load your javascript files at the bottom of your page, rather than the <head> (as is standard for html5boilerplate and yslow recommendations). If nothing like this exists, I'd be glad to submit an implementation of it. As a note: I've looked at the class, but I don't see anything like this. So this is mostly a question of "Do you have a solution, or do I need to make one" :P Another side note: I'd like to be able to do this via controllers or view files, and not utilize a config file every time.
  • I've found that I can do it this way:
    <?php Asset::js('admin/categories.js', array(), 'que'); ?>
    <?php echo Asset::render('que'); ?>
    
    Is that considered the correct way?
  • That's how I do it. My widget views use the first line to define the assets they need, my page templates use the second to render whatever the widgets need.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion