So far in my series on jQuery JavaScript Templating, I've showed how to create a basic jQuery JavaScript template and then nest templates for increased layout flexibility and maintainability. Now, let's dive into two other techniques available in the Microsoft jQuery Templates plugin; inline expressions and code blocks.

<h2>Inline Expressions</h2>

Being able to use a template to create a succinct layout is very powerful but without the ability to manipulate the data that's being rendered, you'd probably find templates a lot less useful. That's where inline expressions come in. Inline expressions allow you to use common JavaScript expressions to effect a change in the way your data is rendered. Using a slightly modified version of the data from my last tutorial, I can show you what I mean. Here's the data:

[code language="js"][/code]
var clientData = [
     { first: "Rey", last: "Bango", age: 42, id: 1, phone: [ "954-600-1234", "954-355-5555" ] },
     { first: "Mark", last: "Goldberg", age: 51, id: 2, phone: ["954-600-1234", "954-355-5555"] },
     { first: "Jen", last: "Statford", age: "25", id: 3, phone: ["954-600-1234", "954-355-5555"] }
 ];

What I did was break out the "name" attribute into "first" and "last"

