Here's a more basic file, it defines the pages to load on, which files to load, and in what order:
I usually just copy one of the auto loader files, edit and rename to create a new one. It's a great feature to be able to have everything listed in one file instead of spread all over different directories. Lat's file is more complex and shows just how flexible this excellent module can be. You can specify all pages using *, and also use pages defined in the admin config with the explode() function. For the simple file that I posted, you just need to change the array that lists the pages like 'product_info' to whatever page(s) you want the js and css to load on. The jscript files are in the template's jscript directory (and subdirectories if there are any like in my example) and the css is in the template's css directory. It's pretty straightforward and quite powerful.PHP Code:$loaders[] = array('conditions' => array('pages' => array('product_info', 'product_reviews', 'product_reviews_info', 'product_reviews_write')),
'jscript_files' => array(
'jquery/jquery-1.9.1.min.js' => 1,
'jquery/jquery.facebox.js' => 32,
'jquery/jquery.form.js' => 33,
'jquery/jquery.bgiframe.min.js' => 34,
'jquery/jquery.rbajax.js' => 35,
'tell_a_friend.js' => 36,
'jquery/jquery.colorbox.js' => 37,
'jqlightbox.php' => 38
),
'css_files' => array(
'facebox.css' => 31,
'colorbox.css' =>32
)
);


Reply With Quote
Thanks for the explanation..


