Beispiel #1
0
 public function actionDelete($id)
 {
     if ($model = Page::findOne($id)) {
         $model->delete();
     } else {
         $this->error = Yii::t('easyii', 'Not found');
     }
     return $this->formatResponse(Yii::t('easyii/newtestmonials', 'Page deleted'));
 }
 public function actionAboutDry($review = null)
 {
     if (isset($_REQUEST['review']) != '') {
         $testmonials = PageModel::find()->where("page_id='" . $_REQUEST['review'] . "'")->one();
         //og tags
         $this->view->params['metatitle'] = $testmonials->title;
         $this->view->params['metadesc'] = strip_tags($testmonials->text);
     }
     return $this->render("about");
 }
Beispiel #3
0
 public function findtestmonails()
 {
     return PageModel::find()->asArray()->all();
 }
Beispiel #4
0
                </article>

            </div>



            <div class="testimonials">
                <div class="title"><?php 
echo Yii::t('easyii', 'testimonials');
?>
 </div>
            </div>
            <?php 
/* A dataprovider with all articles */
$dataProvider = new \yii\data\ActiveDataProvider(['query' => PageModel::find()->where("homepage=0  or homepage=2"), 'pagination' => ['pagesize' => 4]]);
echo \yii\widgets\ListView::widget(['dataProvider' => $dataProvider, 'summary' => '', 'itemOptions' => ['class' => 'item'], 'itemView' => '_reviewnew', 'pager' => ['class' => \kop\y2sp\ScrollPager::className(), 'noneLeftText' => '', 'triggerText' => '<button class="btn dry-btn-2 center-block margin-bottom10">' . yii::t('easyii', 'More Testimonials') . '</button>']]);
//btn dry-btn-2 center-block margin-bottom10
?>

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



    <script>

        function windowPopup(url, width, height) {
            // Calculate the position of the popup so
            // it’s centered on the screen.
Beispiel #5
0
echo $page->text;
?>

                    </p>

                </article>

            </div>



            <div class="testimonials">
                <div class="title">testimonials</div>
            </div>
            <?php 
$testmonials = PageModel::find()->all();
$num = 0;
foreach ($testmonials as $item) {
    $num++;
    if ($num & 1) {
        echo ' <div class="about-review container">';
    } else {
        echo '<div class="gray-review about-review ">
                                        <div class="container">';
    }
    ?>
                    <h4><?php 
    echo $item->owner;
    ?>
 </h4>
                    <h3><?php