You are here: Docs Technical Documentation Distributing Widgets Widget URL Format

Widget URL Format

No matter what type of widget you have, it will be served by Clearspring using the same URL scheme, outlined here.

The Basic Format

http://widgets.clearspring.com/o/WID/PID/-/- 

This URL allows the Clearspring servers to identify the particular widget, and its configuration, to serve up.  The dashes are placeholders for reserved fields, and may normally be omitted.

  • WID = widget ID, uniquely identifying a widget within our system
  • PID = placement ID, uniquely identifying a widget instance within our system

For more background on WIDs and PIDs, see the overview of the WID/PID identification scheme.

example:

http://widgets.clearspring.com/o/461fd6276117bf0f/4654727c791840f3/-/-

example:

http://widgets.clearspring.com/o/461fd6276117bf0f/4654727c791840f3/461fd6276117bf0f/5c742d4b
"/PID/-/-" may be dropped altogether to display a particular widget based only on it's ID (if configurable, the default configuration will appear).
  • ex. http://widgets.clearspring.com/o/4637cc0e7af63b5b
  • ex. http://widgets.clearspring.com/o/4637cc0e7af63b5b/-/-/-/

Note: For widgets using our Javascript wrapper, the URL will be identical, but will have a widget.js appended to it.

Overriding Configuration Parameters

Configurable parameters may be directly overridden in the URL by inserting name/value pairs corresponding to the names of parameters configured in the widget console. To distinguish these parameters from the rest of the standard URL, all four slots (WID, PID, and the two reserved) must be present.

example:

http://widgets.clearspring.com/o/4637cc0e7af63b5b/-/-/-/cFirstName/Angelina/cLastName/Jolie

In this example, the default configuration for the People.com celebrity widget has been overridden to display Angelina's card.

Note 1: Overriding parameters this way, via the URL, will cause all placements generated from the overridden placement to match its parent's configuration.

Note 2: For widgets using the Clearspring Javascript tag, in which the URL will end with widget.js, these parameters must go before the widget.js component of the URL, like this:

example:

http://widgets.clearspring.com/o/4637cc0e7af63b5b/-/-/-/cFirstName/Angelina/cLastName/Jolie/widget.js

 

Note 3: When constructing URLs like this, make sure that all configuration parameters and values are valid URL syntax, meaning that you may need to URL-encode them if they contain special characters not valid in Internet URLs.

For more information on overriding configuration parameters, and to understand why it is useful, see Overriding Parameters.