Forms (content) Lister Page

<form method="GET">
    <div>
        <input type="text" name="search" value="@Request.QueryString["search"]"/>
        <span>
            <button type="submit">Search</button>
        </span>
    </div>
</form>
<br/>

@BRT.Index(tableId:"Content", viewId: "Forms", 
fields: new[] {"Title","Summary","Files"}, 
condition: (String.IsNullOrEmpty(Request.QueryString["formType"])?null:ConditionMeta.Parse("[FormType.Label]='" + Request.QueryString["formType"] + "'")),
sortFields: new EngineCore.Meta.SortFieldMeta[] {new EngineCore.Meta.SortFieldMeta {FieldId = "Title", Descending=false}},
itemTemplate:
@<div>
    @if (item.GetFiles("Files").Count>0) {
        for(int form=0;form < @item.GetFiles("Files").Count; form++) {
            <h4>@item.GetString("Title")</h4>
            <a href="@item.GetFiles("Files")[form].Url" target="_blank">@item.GetFiles("Files")[0].Title
                @if(form > 0){
                <span>(@form)</span>
                }
            </a>
                <p>@item.GetFiles("Files")[0].Description</p>
        }
        <div>
            @if(@item.IsDBNull("Summary")){
                @BRT.Raw(item.GetString("Body").Summarize(230))
            }
            else
            {
                @BRT.Raw(item.GetString("Summary").Summarize(230))
            }
        </div>    
    } 
</div>)

@BRT.CategoryList(tableId:"Content", viewId:"Forms", fieldId:"FormType", template: 
@<div>
    <h4>Form Type</h4>        
    <p><a href="/forms">All</a></p>
    @foreach(EngineRecord c in item) {
        <p><a href="/forms?formType=@c.GetString("Label")">@c.GetString("Label")</a></p>
    }        
</div>)