Blog Posts Simple Listing Page

@BRT.Index(tableId:"Content",viewId:"BlogPosts",
fields: new[] {"Title","PubDate","Summary","Body","Authors.FirstName","Authors.LastName","Authors.PrimaryImage","PrimaryImage"}, 
pageSize:25,
itemTemplate:
@<div>
    <h3><a href="/blogdetail/@item.Href">@item["Title"]</a></h3>
    @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" />
        } 
        <b><a href="/authordetail/@author.Href">@author["FirstName"] @author["LastName"]</a></b></p>
        } 
    }  
    @if(!@item.IsDBNull("PubDate")){
            <p>@item.GetDateTime("PubDate").ToString("d")</p>
    }
    @if(!@item.IsDBNull("Summary")){    
        <p>@item.GetString("Summary").Summarize()</p>
    }
    else {
        <p>@BRT.Raw(item.GetString("Body").Summarize())</p>
    }    
        @if (item.GetFiles("PrimaryImage").Count==1) {
            <img src="@item.GetFiles("PrimaryImage")[0].Url?width=250&height=250" />
        }
    <hr/>
</div>)