You are here: Docs Technical Documentation Configuring Widgets Overriding Parameters

Overriding Parameters

While the Clearspring platform will always ensure that your widget receives the appropriate parameters for the placement in question, sometimes you might want to force a particular configuration manually, for a specific placement. You can do this by injecting parameters into the URL used to serve your widget, as explained in the Widget URL Format guide .  With this mechanism, you can directly override any stored (global or per-placement) parameter.  That is, if the stored configuration parameter for your widget is color = blue, you can create a placement with color = orange, just by modifying the URL that is used to load the widget.

Note: By using this method, any child placements created by end users from the overridden placement (placements created by using the Share options on the placememt with the overridden url) will be configured as per your override.  That is, any new placements based on one with an overridden parameter will also have that override.

Why is this Useful?

Suppose that you operate a popular video-sharing website, and you want to randomly select a video to display on your homepage for each page view. You could use a single object tag in your template, and parameterize it by changing the URL. Let's say your video widget has a "videoId" parameter registered with us via the widget console. Your URL might look like this:
<!--[if IE]><object width="304" height="384" type="application/x-shockwave-flash" quality="high" 
id="W4799127cb9c49102">
<param value="http://widgets.clearspring.com/o/WID/.../.../.../videoId/RANDOM-NUMBER" name="movie"/>
<![endif]-->

<!--[if !IE]>
<!--><object width="304" height="384" type="application/x-shockwave-flash" id="W4799127cb9c49102"
data="http://widgets.clearspring.com/o/WID/.../.../.../videoId/RANDOM-NUMBER">
<!--<![endif]--><param name="wmode" value="transparent"/><param name="allowScriptAccess"
value="always"/><param name="allowNetworking" value="all"/></object><script type="text/javascript"
src= "http://widgets.clearspring.com/o/WID/.../.../.../widget.js"></script> 

NOTE: The object code for your widget is available in the widget console under Publish/Get the code.

If Joe User sees video #4, likes it, and posts it to his MySpace page,the parameter override is consumed by our metadata server and stored with his new placement. Everyone who visits Joe's MySpace page will see video #4 too, and down the road you'll be able to get accurate reporting of which videos are the most popular.