Last modified: August 31, 2012 15:45:02.
Embedding Vars
embedding variables are convenient way to pass settings to CU3ER and override ones defined in configuration XML file. Here is the list of available embedding variables:
| Embedding Variable | Mandatory | Description |
|---|---|---|
| xml_location | Yes | Defines path to XML configuration file |
| xml_encoded | No | Pass whole or parts of XML configuration as URL encoded string. Use encodeURI Javascript function or equal functions in other languages to encode the string..
NOTE: when passing XML string use it as one line - don't use breaks. If xml_location is present then xml_encoded values will overwrite XML from xml_location file. In this case you can pass parts of config XML. If xml_location is not present then you need to pass whole CU3ER config XML through xml_encoded variable. |
| start_slide | No | Slide number CU3ER slideshow will start with |
| images | No | Defines image paths! Will override defined images for slides in XML starting from first image. Images not overridden with this embedding variable will still took place in slideshow. |
| css_location | No | Defines path to CU3ER.css file |
| js_location | No | Defines path to jquery.cu3er.player.js file. If js_location is not provided, our script will try to locate jquery.cu3er.js file and if the script finds it, it will search for jquery.cu3er.player.js file in the same folder. |
| folder_images | No | Defines path to images folder |
| folder_images_fallback | No | Defines path to fallback images folder |
| pause_on_rollover | No | Overrides pause on rollover settings from CU3ER config file - "true" or "false" |
| reverse | No | Force the reverse slide order - "true" or "false" |
| display_js3d_first | No | If browser is capable of 3D CSS transformation, display JavaScript3D version first - "true" or "false" |
| force_javascript | No | Force JavaScript version of slider even on devices that have Flash installed - "true" or "false" |
| force_simple | No | Force simple CU3ER version of slider even on devices that have Flash installed - "true" or "false" |
| force_simple_devices | No | Array of browsers in which Simple CU3ER version will be forced |
| force_2d_devices | No | Array of browsers in which Slicing version will be forced (if those browsers are able to display it) |
| js_disable_3d | No | Disables JavaScript 3D version (displays Slicing or Simple version instead) regardless of browser ability to display it - "true" or "false" |
| js_font_links | No | Array of Google Web Fonts URLs |
| debug | No | Enables debug mode (debug console must be available or else the slider won't load) - "true" or "false" |
| keyboard_controls | No | Disables keyboard controls of the slider - "true" or "false" |
| responsive_slider | No | Disables responsive feature - "true" or "false" |
Embedding Vars code example
<div id="CU3ER">
<p>If you do not see content of CU3ER slider here try to enable JavaScript and reload the page
</p>
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/jquery.cu3er.js"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function($) {
$("#CU3ER").cu3er({
// add your Embedding Vars
vars : {
width: "620",
height: "700",
flash_version : "10.0.0",
// Optional variable - forces displaying of JavaScript version of CU3ER slider even on devices that have Flash installed
force_javascript : 'true',
// Mandatory variable - defines path to XML configuration file
xml_location : 'CU3ER-config.xml',
// Optional variable - pass whole XML configuration as URL encoded string
xml_encoded : '%3Cdata%3E .... %2Fdata%3E',
// Optional variable - defines start slide
start_slide : '4',
// Optional variable - defines image paths! Will override defined images in XML starting from first image
images : 'someImage1.jpg,anotherImage2.jpg,absoluteImageURL3.jpg',
// Optional variable - array of devices on which
force_simple_devices: ['Safari', 'Chrome', 'Firefox', 'IE', 'Opera'],
// Optional variable - array of Google Web Fonts URLs
js_font_links: ['http://fonts.googleapis.com/css?family=Reenie+Beanie','http://fonts.googleapis.com/css?family=Font2', 'http://fonts.googleapis.com/css?family=Font3'],
// Optional variable - disables keyboard controls of the slider
keyboard_controlls : 'false'
},
// add embedding parameters, etc. wmode, bgcolor...
params : { bgcolor : '#ffffff'},
// Object attributes id and name
attributes : { id:"CU3ER", name:"CU3ER" }
});
});
</script>