<?php

/* @var $this yii\web\View */

use common\models\HomeSlider;
use common\models\MiddleContent;
use common\models\RecentCauses;
use yii\helpers\Url;
use common\models\ServicesLeftColumn;
use common\models\ServicesRightColumn;
$this->params['breadcrumbs'][] = ['label' => 'Services'];
?>
<section id="content" class="light_section blog left-sidebar">
	<div class="container" style="padding-top:20px;">
		<div class="row">
			<!-- main content -->
			<div class="col-sm-8 col-md-8 col-lg-9 col-sm-push-4 col-md-push-4 col-lg-push-3">
			<?php $rightcolumns = ServicesRightColumn::find()->all();
			if(!empty($rightcolumns)) {
				foreach($rightcolumns as $rightcolumn){?>
					<article class="side-item events-grid to_animate">
                    <div class="row">
                        <div class="col-md-5">
                            <div class="item-media">
                               <img src="<?php  echo Url::home(true)?>example/events/02.jpg" alt="">
                            </div>
                        </div>

                        <div class="col-md-7">
                            <div class="item-content right">
                                <h2>
                                   <?php echo $rightcolumn->title; ?>
                                </h2>
                                <p>  <?php echo $rightcolumn->content; ?></p>
                            </div>
                        </div>
                    </div>
                </article>
				<?php }  }?>
				
			
				
				
			</div> <!--eof col-sm-9 (main content)-->

			
			<!-- Sidebar -->
			<aside class="col-sm-4 col-md-4 col-lg-3 col-sm-pull-8 col-md-8 col-lg-pull-9">
			<?php $leftcolumns = ServicesLeftColumn::find()->all();
				foreach($leftcolumns as $leftcolumn){ 
				$itemswithcoma = $leftcolumn->items;
				$items = explode(",",$itemswithcoma);
				?>
				<div class="widget widget_categories nachor">
                    <h3 class="widget-title"><?php echo $leftcolumn->title;?></h3>
                    <ul>
					<?php foreach($items as $item) { ?>
                        <li>
                           <?php echo $item; ?> 
                        </li>
						<?php	}?>
                    </ul>
                </div>
				<?php } ?>
			</aside>
			<!-- eof sidebar -->

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