Blog Detail Page

@BRT.Detail(tableId:"Content", viewId:"BlogPosts", 
fields: new[] {"Title", "Friendly", "PubDate", "Body","PrimaryImage","Authors","Authors.PrimaryImage","Authors.FirstName","Authors.LastName"},
template:
@<div>
    <h1>@item.GetString("Title")</h1>
    <hr/>
    @if (!item.IsDBNull("Authors")) {
        foreach(EngineRecord author in item.GetRecordList("Authors")) {          
            <p>
            @if (author.GetFiles("PrimaryImage").Count==1) {
                <img src="@author.GetFiles("PrimaryImage")[0].Url?width=60&height=60&mode=crop" />
            } 
            </p>
            <h4><a href="/authordetail/@author.Href">@author["FirstName"] @author["LastName"]</a></h4>
        } 
    }  
    @if(!@item.IsDBNull("PubDate")){
        <p>       
            @item.GetDateTime("PubDate").ToString("d")
        </p>                    
    }  
    @if (item.GetFiles("PrimaryImage").Count==1) {
        <p><img src="@item.GetFiles("PrimaryImage")[0].Url?width=300&height=300" /></p>
    }    
    <p>@BRT.Raw(item.GetString("Body"))</p>
           
</div>)