<h4>Photo Galleries Block</h4>
{{getCollectionByCategory CollectionID=80 ColumnID=3 Value='on' OrderColumn=2 var=Results}}

<div id="photogalleries">
	<ul>
	{{foreach from=$Results item=v key=k name=n}}
		{{getCollectionByCategory CollectionID=81 ColumnID=5 Value=$v.Collection_80_ID OrderColumn=1 var=Images}}
		{{assign var=Image value=$Images[0]}}
		{{if $smarty.session.UserID gt 0}}
			{{CollectionCanAccess userId=$smarty.session.UserID CollectionId=80 rowId=$v.Collection_80_ID var=canAccess}}
		{{/if}}
		<li {{if $canAccess eq true}} collectionid="80" collectionrowid="{{$v.Collection_80_ID}}" collectioneditor="1"{{/if}}><a href="/photo-gallery/{{$v.Collection_80_ID}}.html"><img src="{{$Image.Collection_81_3}}" width="100" height="100" alt="{{$v.Collection_80_1|replace:'"':'"'}}" /></a></li>
	{{/foreach}}
	</ul>
	<div class="clear"></div>
</div>
