Project

General

Profile

Actions

{ia_add_media}

To include a set of js and css files into template's code {ia_add_media} function is used.

{ia_add_media files='jquery, bootstrap-awesome, css:style, js:intelli/intelli.accordion'}

@files parameter is used to specify one or multiple files to be included.
The inputs should be separated with commas if multiple files are used.

Format to use:

@file_type:@file_name

@file_type js and css types are available.

@file_name
For js files: the file names use @subrion_folder/js/ path by default and should be input without '.js' extension.
For css files: the file names use @subrion_folder/templates/@active_template/css/ path by default and should be input without '.css' extension.

E.g. the code below includes @subrion_folder/js/intelli/intelli.new.js and @subrion_folder/templates/@active_template/css/newstyle.css :

{ia_add_media files="js:intelli/intelli.new, css:newstyle"}

If you need to specify a custom path '_IA_URL_' prefix is used ('_IA_URL_' will be replaced with @subrion_folder).
E.g. the code below will include @subrion_folder/packages/newpackage/js/newfile.js

{ia_add_media files="js:_IA_URL_packages/newpackage/js/newfile"}

Reserved inputs

Some files inputs are reserved for including different sets of js and css files:

Subrion default library

includes files:
@subrion_folder/js/intelli/intelli.js
@subrion_folder/tmp/cache/intelli.config.js

on the front-end:
@subrion_folder/js/utils/sessvars.js
@subrion_folder/js/intelli/intelli.minmax.js
@subrion_folder/js/intelli/intelli.common.js
@subrion_folder/js/frontend/footer.js

in admin area:
@subrion_folder/js/intelli/intelli.admin.js

{ia_add_media files='subrion'}

jQuery library

includes files:
@subrion_folder/js/jquery/jquery.js
@subrion_folder/js/jquery/plugins/jquery.numeric.js

{ia_add_media files='jquery'}

Twitter Bootstrap library

includes files:
@subrion_folder/js/bootstrap/js/bootstrap.min.js
@subrion_folder/js/bootstrap/css/bootstrap-awesome.min.css
@subrion_folder/js/bootstrap/css/font-awesome.css

{ia_add_media files='jquery'}

Autocomplete library

includes files:
@subrion_folder/js/jquery/plugins/autocomplete/jquery.autocomplete.js
@subrion_folder/js/jquery/plugins/autocomplete/jquery.autocomplete.css

{ia_add_media files='autocomplete'}

JsTree library

includes files:
@subrion_folder/js/jquery/plugins/jstree/jquery.jstree.js
@subrion_folder/js/jquery/plugins/jstree/themes/default/style.css

{ia_add_media files='jstree'}

Grid library

includes files:
@subrion_folder/js/intelli/intelli.gmodel.js
@subrion_folder/js/intelli/intelli.grid.js
@subrion_folder/js/ext/plugins/bettercombobox/betterComboBox.js

includes library:
Ext3 library

{ia_add_media files='grid'}

Updated by Anonymous almost 7 years ago · 3 revisions