<div class="filter">
    <ul>
        <li data-filter="*" class="active">all</li>
        <?php foreach ($categories as $item): ?> 
                <?php if ($item->count): ?><li data-filter=".cat_<?php echo $item->category_id ?>"><?php echo $item->title ?></li><?php endif ?>
            <?php endforeach; ?>
    </ul>
</div>
<div class="container fullwidth sessions-page">
    <div class="grid albums" data-gutter="5" data-columns="4">
        <?php foreach ($items as $item): ?> 
            <div class="grid-item cat_<?php echo $item->category_id ?>">
                <div data-background="<?php echo base_url() ?>/cdn/sessions/<?php echo $item->image ?>">

                    <a href="<?php echo base_url() ?>/cdn/sessions/<?php echo $item->image ?>" class="expand" data-rel="lightcase:gal" title="<?php echo $item->title ?>">
                        <i class="fa fa-expand"></i>
                    </a>
                    <a href="<?php echo site_url('session/' . $item->permalink) ?>" class="visited" title="Visited">
                        <i class="fa fa-eye"></i> <?php echo $item->visited ?>
                    </a>
                    <div class="title">
                        <a href="<?php echo site_url('session/' . $item->permalink) ?>" class="link"><?php echo $item->title ?></a>
                    </div>							

                </div>
            </div>
        <?php endforeach ?> 
    </div>
</div>
