{jr_css_src}
The {jr_css_src} template function is used to create a URL call to the proper cached version of a CSS page that has been processed by Jamroom's CSS handler.
Parameters:
Name |
Type |
Required |
Default |
Description |
mode |
string |
no |
"skin" |
The "mode" parameter tells Jamroom the "type" of CSS file that is going to be processed, which in turn tells Jamroom what directory to look in for the css.php control file. Default is "skin", which means Jamroom will look in the jamroom/skins/Active_Skin directory for the "css.php" file to process. Valid options are:
|
skin |
string |
no |
n/a |
If you are using the "skin" or "cp" mode, then you can also define the Skin Name by using the "skin" parameter - this allows you to tell Jamroom to look into a specific skin directory for the required css.php file. |
theme |
string |
no |
n/a |
If you are using the "theme" mode, then you need to also pass in the theme directory (i.e. "Sage") as the theme parameter, so Jamroom knows that theme directory to look in for the required css.php file. |
config |
string |
no |
"css.php" |
If you would like to define an alternate name for the required css.php file, you can pass the new name in with the "config" parameter. |
Example Usage:
<link href="{jr_css_src skin="Nova"}" rel="stylesheet" type="text/css" media="screen">
|
<link href="{jr_css_src mode="theme" theme="Nova"}" rel="stylesheet" type="text/css" media="screen">
|
Required css.php file:
The {jr_css_src} function "reads" a required config file, that is (by default) called "css.php" and must be located in the skin, theme, or skin/cp directory. It defines a PHP "array" of CSS files that are included in the output CSS file:
<?php
// css.php - Nova Skin CSS definitions
// @package Jamroom_Library
// @copyright 2003-2010 by Brian Johnson / Talldude Networks LLC
// @author Brian Johnson - bigguy@talldude.net
// $Id: css.php,v 1.2 2010/07/13 15:02:19 bigguy Exp $
defined('IN_JAMROOM') or exit();
// Full path to CSS file => minify/no_minify/code
$_css = array();
$_css["{$jamroom['jm_dir']}/skins/Nova/Nova.css"] = 'minify';
$_css["{$jamroom['jm_dir']}/include/css/jquery.lightbox.css"] = 'minify';
|