{{assign var=fileNameToUse value='/events/'}}
{{assign var=CalendarCollection value=236}}
{{assign var=VenueCollection value=237}}
{{assign var=CalPrefix value='Collection_'|concat:$CalendarCollection|concat:'_'}}
{{assign var=VenuePrefix value='Collection_'|concat:$VenueCollection|concat:'_'}}
{{assign var=EventID value=$CalPrefix|concat:'ID'}}
{{assign var=EventName value=$CalPrefix|concat:'1'}}
{{assign var=EventStart value=$CalPrefix|concat:'2'}}
{{assign var=EventEnd   value=$CalPrefix|concat:'3'}}
{{assign var=EventImage  value=$CalPrefix|concat:'5'}}
{{assign var=EventSmallImage  value=$CalPrefix|concat:'6'}}
{{assign var=EventDesc  value=$CalPrefix|concat:'4'}}
{{assign var=EventActive  value=$CalPrefix|concat:'19'}}
{{assign var=EventVenue  value=$CalPrefix|concat:'7'}}
{{assign var=VenueID   value=$VenuePrefix|concat:'ID'}}
{{assign var=VenueName  value=$VenuePrefix|concat:'1'}}
{{getCollectionByCategory CollectionID=$CalendarCollection ColumnID='ID' aditionalFilter=' '|concat:$EventActive|concat:' = "on" ' Value=$smarty.get.EventID var=Events OrderColumn=1 }}

{{if $Events|@count eq 0}}
	{{php}} header("HTTP/1.0 404 Not Found"); {{/php}}
	{{getcontent id=$smarty.const.PAGE_NOT_FOUND_PAGE}}
{{else}}


{{assign var=Event value=$Events[0]}}
{{capture name=a assign=specialBreadcrumb}}
					<a href="/">Home</a> &g{{**}}t; <a href="/events/">Events</a> &g{{**}}t; {{$Event.$EventName}}
{{/capture}}


{{assign var='PageTitle' value=$Event.$EventName}} {{assign var='PageTitle' value=$PageTitle|concat:' | Events '}}{{setPage var=Collection_17_2 value=$PageTitle}} 
<h1>{{$Event.$EventName}}</h1>
{{if $Event.$EventVenue gt 0}}
{{getCollectionByCategory CollectionID=$VenueCollection ColumnID='ID' Value=$Event.$EventVenue var=Venues OrderColumn=1 }}
{{assign var=Venue value=$Venues[0]}}
<p class="intro"><a href="/event-venues/{{$Venue.$VenueID}}.html">{{$Venue.$VenueName}}</a></p>{{/if}}
{{if $Event.$EventImage neq ''}}<img src="{{$Event.$EventImage}}" class="content-image" />{{/if}}
<p><em>{{$Event.$EventStart|date_format:'%m/%d/%Y %I:%M %p'}}</em> <br/>
 {{$Event.$EventDesc|nl2br}}</p>
 
 
{{if $smarty.session.UserID gt 0}}
{{CollectionCanAccess userId=$smarty.session.UserID CollectionId=$CalendarCollection rowId=$smarty.get.EventID var=DisplayLink}}
{{if $DisplayLink}}
{{capture name=eventfadmin assign=eventFrontEndAdmin}}

var obj = $('#AdminMenu8').parent().find('ul');
$("<li id='adminFrontEditEvent'><a class='level2' href='javascript://'>Edit Event</a></li>").appendTo(obj);
$("#adminFrontEditEvent").click(function(){ adminDialog ( "1" , "&id=236&eid={{$smarty.get.EventID}}" , "" , 900 , 600 , "Edit Event: {{$Event.$EventName|addslashes}}" );  });
$('#AdminMenu13').remove();
$('#AdminMenu2').remove();

{{/capture}}
{{assign var=JavaScriptJQueryCode value=$JavaScriptJQueryCode|concat:' '|concat:$eventFrontEndAdmin}}

{{/if}}
{{/if}}


{{/if}}