{{assign var=DiscName value=1|fieldName:$DescCollection}}
{{assign var=DiscID value='ID'|fieldName:$DescCollection}}
{{assign var=DiscPosted value=5|fieldName:$DescCollection}}
{{assign var=PostedBy value=6|fieldName:$DescCollection}}
{{assign var=Abstract value=4|fieldName:$DescCollection}}
{{foreach from=$Last5Articles item=v key=k}}
<div id="blog_article">
{{getCollectionByCategory CollectionID=1 OrderColumn=1 OrderWay=1 var=User ColumnID='ID' Value=$v.$PostedBy}}
{{assign var=UData value=$User[0]}}
{{getCollectionByCategory CollectionID=$CommentsCollection OrderColumn=1 OrderWay=1 var=Comments ColumnID='4' Value=$v.$DiscID}}
<h4>{{assign var=dateposted value=$v.$DiscPosted}}{{$dateposted|date_format:"%A, %B %e, %Y"}}</h4>
<h3><a href="/blog-article.html?article={{$v.$DiscID}}">{{$v.$DiscName}}</a></h3>
<p>{{$v.$Abstract}}</p>
<p><a href="/blog-article.html?article={{$v.$DiscID}}">Read More and Post Comments>></a></p>
<p><span>Posted By {{$UData.Collection_1_3}} {{$UData.Collection_1_4}} at {{$dateposted|date_format:"%H:%M"}}</span> <span><strong>{{$Comments|@count}} comments</strong></span>
{{if $UData.Collection_1_ID eq $smarty.session.UserID}}<a href="/edit-article.html?article={{$v.$DiscID}}"><img src="/images/edit-icon.gif" border="0"/></a>{{/if}}
{{if $moderatorUser eq 1}}
		{{if $UData.Collection_1_ID neq $smarty.session.UserID}}<a href="/edit-article.html?article={{$v.$DiscID}}"><img src="/images/edit-icon.gif" border="0"/></a>{{/if}}
		<a href="javascript: if(confirm('Delete Article?')) { window.location='/delete-article.html?article={{$v.$DiscID}}'; }"><img src="/images/delete-icon.gif" border="0"/></a>			
			{{/if}}
</p>
</div>
{{/foreach}}