<?php
$this->load->view("top");
$QryStringArr = array();  // To store all Query Variables so to move to other view;
$QryStringArr = array_unique($QryStringArr);
if (isset($this->meta_info['entity_id']) && $this->meta_info['entity_id'] != '') {
  $QryStringArr['category_id'] = $this->meta_info['entity_id'];
}
if ($this->input->get_post('keyword') != '') {
  $QryStringArr['keyword'] = $this->input->get_post('keyword');
}
if ($this->input->get_post('sort') != '') {
  $QryStringArr['sort'] = $this->input->get_post('sort');
}
//category_banner
?>




        <!-- Heading Banner--->
        <section class="heading_banner" style="background-image: url(<?php echo theme_url();?>images/products/products.jpg)">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12 text-center">
                        <div class="cat_title"><?php echo $page_title; ?></div>
                        <div class="clearfix"></div>
                        <div class="cat_title2">We Are Available For You</div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Breadcrumb--->
        <section class="inner_breadcrumb hidden-xs">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <ul class="breadcrumb">
                            <li><a href="<?php echo site_url();?>" title="Home">Home</a></li>
                            <!--<li><a href="product-listing.php" title="Our Products">Our Products</a></li>-->
                            <li class="active"><?php echo $page_title; ?></li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>


        <!-- Home About--->
        <section class="about_page">
            <div class="container">
                <div class="row">
                    <div class="col-md-9 col-md-push-3">
                        <div class="right_side">
                            <h1><?php echo $page_title; ?></h1>
                            <div class="wps_right">
                                <div class="product_right_image">
                                    <a href="javascript:void()" data-toggle="modal" data-target="#productID"
                                        title="Home Textile & Furnishings">
                                        <div class="product_dimage">
                                            <div class="detail_image">
                                                <img src="<?php echo get_image_with_name($parentres['category_name'], 'category', $parentres['category_image'], '500', '500', 'R'); ?>"
                                                alt="<?php echo imagealtTitle('', $parentres['category_name'], ''); ?>"
                    title="<?php echo imagealtTitle('', $parentres['category_name'], ''); ?>">
                                            </div>
                                        </div>
                                        <a class="read_more_product getQuotes" href="#" data-friendly_url="<?php echo site_url().$parentres['friendly_url']; ?>" data-productType="Category" data-productID="<?php echo $parentres['category_id']; ?>" data-productName="<?php echo $parentres['category_name']; ?>" data-productImage="<?php echo get_image('category', $parentres['category_image'], '500', '500', 'R'); ?>" data-proDescription="<?php echo $parentres['short_desc']; ?>" data-toggle="modal"
                                                data-target="#productID" title="Send Enquiry">Send Enquiry</a>
                                    </a>
                                </div>


                                <div><?php echo $parentres['category_description'];?></div>

                                <div class="clearfix"></div>
                                <!-- Products Listing -->
                                <?php 
                                if(is_array($res) && !empty($res)) { 
                                    foreach ($res as $key => $value) { 
                                    $link_url = site_url($value['friendly_url']);
                                ?>
                                <div class="product_listing">
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="product">
                                            <a href="<?php echo $link_url;?>" title="<?php echo imagealtTitle('', $value['category_name'], ''); ?>">
                                                <div class="image1">
                                                    <img src="<?php echo get_image_with_name($value['category_name'], 'category', $value['category_image'], '500', '500', 'R'); ?>" alt="<?php echo imagealtTitle('', $value['category_name'], ''); ?>" title="<?php echo imagealtTitle('', $value['category_name'], ''); ?>" class="img-responsive">
                                                </div>
                                            </a>
                                        </div>
                                    </div>

                                    <div class="col-sm-8 col-xs-12">
                                        <div class="right-content">
                                            <h3><a href="<?php echo $link_url;?>" title="<?php echo imagealtTitle('', $value['category_name'], ''); ?>"><?php echo $value['category_name'];?></a></h3>
                                            <div class="blue-line1"></div>
                                            <p><?php echo $value['short_desc'];?></p>
                                            <a href="<?php echo $link_url;?>" class="read_more_product" title="">Read More
                                                <i class="fa fa-long-arrow-right fa-1x"></i></a>
                                            <a class="read_more_product getQuotes" href="javascript:void(0)" data-friendly_url="<?php echo site_url().$value['friendly_url']; ?>" data-productType="Category" data-productID="<?php echo $value['category_id']; ?>" data-productName="<?php echo $value['category_name']; ?>" data-productImage="<?php echo get_image('category', $value['category_image'], '500', '500', 'R'); ?>"  data-proDescription="<?php echo $value['short_desc']; ?>" data-toggle="modal"
                                                data-target="#productID" title="Send Enquiry">Send Enquiry</a>

                                        </div>
                                    </div>
                                </div>
                                <?php } } ?>
                            </div>
                        </div>
                    </div>

                    <div class="col-md-3 col-md-pull-9">
                        <?php $this->load->view("category/category_left_view"); ?>

                        <div id="sticky-anchor"></div>
                        <div class="left_sidebar" id="sidebar">
                            <?php $this->load->view("pages/quick_contact"); ?>
                        </div>

                    </div>

                </div>
            </div>
        </section>

        <!-- Footer--->
        <?php $this->load->view("bottom"); ?>