<?php if (count($photos) == 0): ?>
<?= $this->html->link("Add a photo","photos::add"); ?>
<?php else: ?>
<?php foreach($photos as $photo): ?>
	<?=$this->html->image("/photos/view/{$photo->_id}.jpg"); ?>
<?php endforeach; ?>
<?php endif; ?>