Say I have an object such as:
{
id: 345,
title: 'Some title',
body: 'Here be a lot of text',
author: {
id: 1
name: Bob
email: [email protected]
}
}
How would I reference the properties of the author in my template
e.g.,
var template = new Template('
<div class='blog_post'>
<h1><a href='/blog/post/#{id}'>#{title}</a></h1>
<div>#{body}</div>
<div><a href="mailto:#{author_email}">#{author_name}</a></div>
</div>
');