Custom Events List

@*
<h4>@Site.GetRecordList("District")[0].GetString("Name"), other &quot;District&quot;, and &quot;Conference&quot; events</h4>

@BRT.Calendar(DetailPage: "event",savedFilters: new[] {"Future"}, fields: new[] {"StartDate","EndDate","Title","PrimaryImage","RelatedSites","Body","RegForms","RegForms.Friendly","Friendly"} ,
pageSize:5000, 
template:                    
@<div>
    
    @foreach(EngineRecord record in item) {
        string thelink = "";
        if(!@record.IsDBNull("RegForms")){
            thelink="https://mississippi-reg.brtapp.com/" + record.GetRecordList("RegForms")[0].GetString("Friendly");
        }
    
        
        <hr/>
        
        <h4><a href="/event/@record.Href"> 
            @if(!@record.IsDBNull("Title")){
                @record.GetString("Title")
            }
        </a></h4>
        
        if(!@record.IsDBNull("StartDate")){
            <p class="camp-date">
            <b>
            @if(record.GetDateTime("StartDate").ToString("h tt")!="12 AM") {
                @(record.GetDateTime("StartDate").ToString("dddd, MMMM dd yyyy - h:mm tt")) 
            }
            else {
                @(record.GetDateTime("StartDate").ToString("dddd, MMMM dd yyyy")) 
            }
            </b>
            @if(!@record.IsDBNull("EndDate") && (record.GetDateTime("EndDate").ToString("dddd, MMMM dd yyyy - h:mm tt")!=record.GetDateTime("StartDate").ToString("dddd, MMMM dd yyyy - h:mm tt")) ){
                <b> to 
            @if(record.GetDateTime("EndDate").ToString("h tt")!="12 AM") {
                @(record.GetDateTime("EndDate").ToString("dddd, MMMM dd yyyy - h:mm tt")) 
            }
            else {
                @(record.GetDateTime("EndDate").ToString("dddd, MMMM dd yyyy")) 
            }
            </b>
            }
            </p>
        }
        if(!@record.IsDBNull("Body")){
            <p>@record.GetString("Body").Summarize()</p>
        }
        
    }
</div>
)
*@