Every Klip requires a data source to display data. The data source is usually specified using the <contentsource> parameter.
![]() | Some sample and template Klips don't use the <contentsource> parameter to access the data. Why not? |
|---|---|
For every type of data source that Klipfolio Dashboard supports, there are APIs for specifying its location, sending a request to the server, getting the data, and returning it to the Klip for it to display using its stylesheet. This is written in JavaScript in the <klipscript> block. However, for some of the source types, you can use the <contentsource> parameter to specify the source location instead. This parameter is essentially a shortcut to all that you would otherwise need to write out in JavaScript. By using <contentsource>, you are letting the default functionality of the application's internal engines take care of the above-mentioned process. Chapter 3, Adding Your Own Logic to the Klips discusses this in more detail. | |
Open the Klip's source code by clicking the button in its title bar, or by selecting View source from its menu. You can also use the keyboard shortcut, .

Even though this is a "blank" Klip, it already has numerous sets of empty XML parameters in it.
Scroll down until you see <contentsource> inside the <locations> block and add http://support.klipfolio.com/files/demo/demo.xml.
<contentsource> http://support.klipfolio.com/files/demo/demo.xml </contentsource>
Reload the Klip.

Now the Klip should no longer look stale because it has access to the data source.

Whether or not the Klip looks stale is a good way to confirm if it has access to the data source. If it still looks stale now, double-check the following:
If you load this URL in a web browser, can you access its content? If your machine can't access the data source, your Klip can't, either.
Did you reload the Klip? Refreshing the Klip only triggers the refresh event in the already loaded Klip.
Did you put the URL between the <contentsource> and </contentsource> tags?
Make sure that your Klip is active (i.e. not stale) before moving on to the next steps. Without the Klip having access to the data source, you will not be able to retrieve any data from it.