<?php
$current_url = current_url();
$meta_tags = $this->common_model->getMetaTitle($current_url);
$header_image = $this->config->item('uploads') . 'header_images/' . $meta_tags['header_image'];
$background_image = $this->config->item('uploads') . 'background_images/' . $meta_tags['background_image'];
?>
<section class="page-heading" <?php if ($meta_tags['header_image'] != '') { ?> style='background-image: url("<?= $header_image ?>");' <?php } ?> >
    <div class="container">
        <h1><?php echo $page_heading ?> Gallery</h1>
        <ol class="breadcrumb">
            <li><a href="<?= site_url() ?>"><i class="fa fa-home"></i></a></li>
            <li class="active"><?php echo $page_heading ?> Gallery</li>
        </ol>
    </div>
</section>
<section class="MainContent" <?php if ($meta_tags['background_image'] != '') { ?> style='background-image: url("<?= $background_image ?>");' <?php } ?>>
    <div class="container">
        <h2 class="section-heading"><?php echo $page_heading ?> Gallery</h2>
        <div class="row">
            <?php
            $i = 1;
            foreach ($gallery_data as $gallery) {
                ?>
                <div class="device_full col-xs-6 col-sm-4 col-md-3">
                    <div class="menubox">
                        <div class="menu_img">
                            <a href="<?= base_url() ?>assets/uploads/province_images/<?= $gallery['province_id'] ?>/<?= $gallery['image_name'] ?>" class='fancybox' data-fancybox-group='<?php echo $page_heading ?>'>
                                <img src="<?= $this->config->item('uploads') ?>province_images/<?= $gallery['province_id'] ?>/<?= $gallery['image_name'] ?>" alt="Menu" class="img-responsive">
                            </a>                        
                        </div>                
                    </div>
                </div>    
                <?php if ($i % 4 == 0) { ?>
                    <div class='clearfix'></div>
                    <?php
                } $i++;
            }
            ?>
        </div>
    </div>
</section>