Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Dylan Lopez
Added: Jan 23, 2018 9:37 AM
Modified: Mar 12, 2018 9:45 AM
Views: 24
Tags: assets css
//Use in Template files
// Creates:
<link rel="stylesheet" type="text/css" href="http://mysite.com/themes/default/screen.css" media="screen" />
  1. echo Assets::css();
  2. // Creates:
  3. //<link rel="stylesheet" type="text/css" href="http://mysite.com/themes/default/screen.css" media="screen" />
  4.  
  5.  
  6. echo Assets::css('http://mysite.com/path/to/my.css');
  7. // Output: <link rel="stylesheet" type="text/css" href="http://mysite.com/path/to/my.css" media="screen" />
  8.  
  9. echo Assets::css('/path/to/my.css');
  10. // Output: <link rel="stylesheet" type="text/css" href="http://mysite.com/path/to/my.css" media="screen" />
  11.  
  12.  
  13. //Rendering Multiple Custom Files
  14. $styles = array(
  15.     'bootstrap.css',
  16.     'markitup/sets/minimal/styles'
  17. );
  18.  
  19. Assets::css($styles);