Fork me on GitHub

What is Cadenza?

Cadenza is a template language for processing text in a secure and flexible way. Cadenza was built with simplicity in mind, keeping the complexities of rendering logic as simple as possible to help those without a technical background grasp the essential concepts and be able to use them.

Using Cadenza: for Designers

How you use Cadenza will ultimately be determined by whoever has set up your environment. The best place to start is having a look at the syntax guide to get an idea. Also, you can try out cadenza at any point here.

Using Cadenza: for Programmers

Cadenza is a library which can be embedded into any language which supports interpreting Ruby. This means that any framework which is built on Ruby, such as Ruby on Rails or Sinatra is capable of integrating Cadenza as well as languages such as Java which can make use of Cadenza through an embedded interpreter like JRuby or IronRuby.

Using Cadenza with Ruby

In your console run the following command

gem install cadenza

There are several ways to render your templates with Cadenza. The simplest way is via the Cadenza#render method. Here's an example in your IRB console:

>> require 'rubygems'
=> false
>> require 'cadenza'
=> false
>> Cadenza.render "Hello {{name}}", :name => "World"
=> "Hello World"  
>> Cadenza.render "Hello {{name}}", :name => "from Cadenza"
=> "Hello from Cadenza"

Pretty simple, eh?

Thats the basics. From here you'll probably want to have a look at the reference pages to get more of an understanding of Cadenza.