Referencing variables with ${}

When working with templates and you want to reference a variable within the text, you can use the ${variableName} notation.

For example,

<span>You have ${count} credits left.</span>

You can also use the same PHPTALES paths as in other PHPTAL constructs:

<span>Your best friend is: ${php: !some.other() ? "me" : "your dog"}</span>

Tip

If you have to exscape the ${var} notation, write $${var}.