 <?php
Yii::app()->setLanguage(isset(Yii::app()->session['lang']) ? Yii::app()->session['lang'] : 'ar'); 
$lang=Yii::app()->getLanguage();
 ?>
 
<div class="">
             <?php  

                $categories=Menu::model()->findByAttributes(array('title'=>'section3'));
                if($categories!=null)
				{
                    
                    $j=1;
					foreach($categories->menuItems as $Category)
                    {
                        if($j<=4){
                            echo '<div class="link-container">
                                    <a href="'.Yii::app()->request->baseUrl.$Category->link.'" >';
                                echo '<div class="col-sm-3 col-xs-6 main-row">
                                        <div class="  row  row-style">
                                            <div class="col-sm-8 col-xs-8">
                                                <div class="row">
                                                    <div class="vert">
                                                        <h2 class="main-text  text-center">'.($lang=='en'?$Category->en_title:$Category->title).'</h2>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-xs-4">';
                                            if($Category->image!=NULL){
                                                echo '<img class="img-responsive icon-img " alt="icon-img" src="'.Yii::app()->request->baseUrl.'/uploads/MenuItem/'.$Category->image.'">';}
                                                echo '
                                            </div>
                                        </div> 
                                    </div> 
                                </a>
                            </div>';
                  
                    }
                   $j++; 
                 }
                }
                ?>
</div>