Example #1
0
 private function findPage($id_slug)
 {
     $page = PageModel::find()->where(['or', 'page_id=:id_slug', 'slug=:id_slug'], [':id_slug' => $id_slug])->one();
     return $page ? new PageObject($page) : $this->notFound($id_slug);
 }
Example #2
0
use yii\easyii\modules\news\api\News;
use yii\easyii\modules\page\api\Page;
use yii\easyii\modules\text\api\Text;
use yii\helpers\Html;
use yii\easyii\models\Setting;
use app\modules\awarness\api\Feedback as Awarness;
$page = Page::get('about');
$this->title = $page->seo('title', yii::t('easyii', 'awareness program'));
use yii\widgets\ActiveForm;
$this->params['meta_keyword'] = yii::t('easyii', 'Better sanitary napkin after birth, married for sanitary napkin, the best types of sanitary pads, better health towel menstrual cycle');
$this->params['meta_description'] = yii::t('easyii', 'Dry awareness program aims to provide care and health education for girls in schools & universities where they are providing the right information by experts');
?>

<div class="content">
    <?php 
$banner = \app\modules\advertise\models\Page::find(1)->one();
Yii::$app->language == 'en' ? $image = $banner->image : ($image = $banner->image_ar);
?>
          <img class="img-responsive awwarenece" src="<?php 
echo $image;
?>
">


    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <?php 
$page = Page::get('know-more-about-us');
?>
                <h2 class=" lined-heading"><span><?php 
Example #3
0
    $i++;
}
?>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="container-fluid">
        <div class="row ">
            <ul class="col-md-12 col-centered features-group">
                <?php 
$adv1 = \app\modules\advertise\models\Page::findOne(2);
$adv2 = \app\modules\advertise\models\Page::findOne(3);
$adv3 = \app\modules\advertise\models\Page::findOne(4);
?>

                <li class="wow fadeIn"  data-wow-duration="3s" data-wow-delay=".5s">
               <?php 
if ($adv1->url) {
    ?>
 <a href="<?php 
    echo $adv1->url;
    ?>
"> <?php 
}
?>
                    <img src="<?php 
echo Yii::$app->language == 'en' ? $adv1->image : $adv1->image_ar;
?>
Example #4
0
 public function actionClearImageAr($id)
 {
     $model = Page::findOne($id);
     if ($model === null) {
         $this->flash('error', Yii::t('easyii', 'Not found'));
     } elseif ($model->image_ar) {
         $model->image_ar = '';
         if ($model->update()) {
             @unlink(Yii::getAlias('@webroot') . $model->image_ar);
             $this->flash('success', Yii::t('easyii', 'Image cleared'));
         } else {
             $this->flash('error', Yii::t('easyii', 'Update error. {0}', $model->formatErrors()));
         }
     }
     return $this->back();
 }