
  <?php 
/// un use - courses page

  if( have_rows('advantages') ): while ( have_rows('advantages') ) : the_row(); 
	$image = get_sub_field('icon');
	$size = 'icon';
			if($image){
			$thumb = $image['sizes'][$size];
			}
		
	if (get_sub_field('external_link' )) {
	//$url = get_field('external_link');
	$target = 'target="_blank" rel="nofollow"';
	} else {
		$target = '';
	}  
	
					

?>
<div class="col-xl-2 col-md-6">
	<div class="box-item mht">
  	
        <div class="box-icon">  
        <?php if($image){?>
        <img src="<?php echo $thumb; ?>" alt="<?php the_sub_field ('box_title'); ?>" />
        <?php } ?>
        </div>
     
    <div class="box-title" data-mh="title"><?php the_sub_field ('box_title'); ?></div>
     <div class="box-text" data-mh="text"><?php the_sub_field ('box_text'); ?></div>
     <div class="box-link">
 <?php if(get_sub_field('box_link')) { ?>  
<a href="<?php the_sub_field ('box_link'); ?>" <?php echo $target; ?>>
<?php the_sub_field ('box_link_title'); ?> 
</a>
<i class="fa fa-angle-left" aria-hidden="true"></i>
<?php } ?>
</div><!--link-->




      </div><!--item--> 

   	
</div><!--col-->
        <?php
		endwhile;
		endif; ?>
      
      