<?php get_header('insidepages'); ?>

    <?php
    if (have_posts()){
        the_post();
            $newsPageId = get_ID_by_slug('pars-patent-news');
            $newsPage = get_post($newsPageId);

            if(get_field('icon_page', $newsPageId)) $icon = get_field('icon_page', $newsPageId);
            $title = $newsPage->post_title;
    }
    ?>

    <!-- Banner : Begin -->
    <div class="row no-margin slider">
        <div class="rounded">
            <div class="bannercontainer">
                <div class="banner" style="visibility:hidden">
                    <ul>
                        <!-- Slides : Begin -->
                        <?php
                        /*
                        *  Loop through Slider Repeater fields (From another $post ID)
                        */

                        if(get_field('sliders', $newsPageId) )
                        {
                            
                            while(has_sub_field('sliders', $newsPageId) )
                            {
                                if(get_sub_field('image_banner')) $image = get_sub_field('image_banner');

                        ?>
                                
                        <li data-transition="fade">
                            <img src="<?php echo $image; ?>" alt="" />
                            <div class="all-container row no-margin clr-0">
                                    <div class="container">
                                        <span class="caption sfl" data-speed="600" data-start="500" data-easing="easeIn"><img  src="<?php echo $icon; ?>" alt=""/></span>
                                        <h3 class="caption fade sfr" data-speed="600" data-start="600" data-easing="easeIn"><?php echo $title; ?></h3>
                                    </div>
                            </div>
                        </li>
                        
                        <?php
                            }
                        }
                        ?>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!--  Banner : End -->

    <!-- Intro -->
    <div class="row no-margin">
        <div class="container margin_T_80 theme-padding"> 
            <p class="txt_al_j">
            <br />
            </p>
        </div>
    </div>
    <!-- /Intro -->



    <!-- News : Begin -->
    <div class="row no-margin"> 
        <div class="container theme-padding">

            <div class="news-item clr-1">
                <div class="image-div col-sm-5 no-padding">
                        <a href="<?php echo get_permalink(); ?>"><img class="img-responsive center-block" alt="<?php the_title(); ?>" src="<?php the_img_url('large' , $post->ID); ?>"/></a>
                        <span><img src="<?php echo $icon; ?>" alt="<?php the_title(); ?>"/></span>
                </div>
                <div class="text-div col-sm-7">
                    <h3><a href="<?php echo get_permalink($post->ID); ?>"><?php the_title(); ?></a></h3>
                    <p><?php the_content(); ?></p>
                </div>
            </div>

        </div>  
    </div>
    <!-- News : End -->


                    
<?php get_footer('insidepages'); ?>