Custom Events List
If you need to do a list of events but do not want to use our off-the-shelf calendar
@*
<h4>@Site.GetRecordList("District")[0].GetString("Name"), other "District", and "Conference" 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([email protected]("RegForms")){
thelink="https://mississippi-reg.brtapp.com/" + record.GetRecordList("RegForms")[0].GetString("Friendly");
}
<hr/>
<h4><a href="/event/@record.Href">
@if([email protected]("Title")){
@record.GetString("Title")
}
</a></h4>
if([email protected]("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([email protected]("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([email protected]("Body")){
<p>@record.GetString("Body").Summarize()</p>
}
}
</div>
)
*@