CML hints and tips

Suggestions on how to get the most out of the CODA Markup Language

Twitta - Twitter feed in CML

Using CODA to keep track of your social world...

Here's a PHP script which will give you your Twitter feed in CML, so you can just assign it to a CODA display. If you want to track more esoteric things, like the raising and lowering of Tower Bridge or the movements of the Isle of Wight ferry, you may prefer to create a separate Twitter account just for your CODA screen rather than mixing them in with your normal friends!

New CML features

The <div> tag in CML now has three new features which can make your screen layouts more attractive.

translucent backgrounds
You can set the backgroundOpacity attribute to make semi-transparent overlays
rounded corners
The cornerRadius attribute lets you be a bit less square
vertical gradients
Divs can change colour from top to bottom using the backgroundGradientColors attribute.

Prettier CML with background images

If you want to add an interesting background to your CML-based displays, you can create an image in another package - say, Keynote, Photoshop or Powerpoint - and specify a full-screen div containing that image before overwriting it with your hand-tweaked or code-generated CML content.

The relevant CML used for this example is...

Generating your own CML

It's easy to create your own CML files, save them on a web server and assign them to a screen. But don't forget that they can be dynamically generated by a piece of software.

Here, for example, is a simple PHP script which you can put on a Linux-based web server and it will show you the current load on that server.