Configuration for assets

edited December 2013 in Installation
Hi,
I'm having problems getting the asset helper functions js() and css() to work properly. I have simply called them like js('somefile') but it outputs the file's content rather than a link (script src). There seems to be some inline setting somewhere but I'd like to confirm this somehow. Can the asset options array be printed from within a view?
Thanks in advance,
Jan

Comments

  • edited 10:07PM
    By default, it should just insert a link to that asset.
    <link href="/assets/css/main.css?c=-62169955200" media="all" rel="stylesheet"/>
    There is, however, an option you can pass in the third parameter of options called "inline" that will pull in the CSS and/or JS file inline. This can be set in the fuel/application/config/asset.php config file by changing the asset_output value to "inline" OR by calling the function like so:
    echo css('my.css', 'app', array('output' => 'inline'));
  • edited 10:07PM
    Thank you! Maybe some caching problem...
  • edited 10:07PM
    Perhaps. You can clear FUEL's cache in the admin (Page Cache).
Sign In or Register to comment.