예제 #1
0
 public function actionView($slug)
 {
     $article = Article::get($slug);
     if (!$article) {
         throw new \yii\web\NotFoundHttpException('Article not found.');
     }
     return $this->render('view', ['article' => $article]);
 }
예제 #2
0
 public function actionView($slug)
 {
     $article = Article::get($slug);
     if (!$article) {
         throw new \yii\web\NotFoundHttpException('Article not found.');
     }
     $article_items = Article::last_items(3, $article->model->item_id);
     return $this->render('view', ['article' => $article, 'article_items' => $article_items]);
 }
예제 #3
0
파일: contacts.php 프로젝트: Bazitron/easls
<?php

/**
 * @author: Vasya Zhuryk <*****@*****.**>
 * @version 1.0
 */
use yii\easyii\modules\article\api\Article;
$this->title = 'Контакты';
?>
<div class="jumbotron">
    <?php 
echo Article::get('page-contacts')->model->text;
?>
</div>
예제 #4
0
파일: index.php 프로젝트: Bazitron/easls
<?php

/* @var $this yii\web\View */
use yii\easyii\modules\news\api\News;
use yii\easyii\modules\carousel\api\Carousel;
use yii\easyii\modules\article\api\Article;
$this->title = 'ЕШСС - спортивное служение';
?>
<div class="jumbotron">
    <?php 
echo Carousel::widget('1020', '300', ['interval' => 6000]);
?>
</div>

<h1><?php 
echo Article::get('home-about')->model->title;
?>
</h1>

<p>
    <?php 
echo News::get('main-page')->text;
?>
</p>

<div class="row marketing">

    <?php 
foreach (Article::last(2, ['category_id' => 3]) as $item) {
    ?>
예제 #5
0
 /**
  * @return string
  */
 public function actionEasls()
 {
     $slug = \Yii::$app->request->get('s');
     $page = Article::get($slug);
     return $this->render('easls', ['page' => $page]);
 }
예제 #6
0
<?php

use yii\easyii\modules\article\api\Article;
$article = Article::get($slug);
$category = Article::cat($article->cat->slug);
?>

<div class="container content-page">
    <div class="row">
        <div class="col col-3 left-col">

            <?php 
$items = [];
foreach ($category->items() as $item) {
    $items[] = ['label' => $item->title, 'url' => ['site/article', 'slug' => $item->slug]];
}
?>
            <?php 
echo \yii\widgets\Menu::widget(['items' => $items, 'options' => ['id' => 'left-menu']]);
?>
        </div>
        <div class="col col-7 right-col">
            <h1><?php 
echo $article->title;
?>
</h1>

            <div class="content">
                <?php 
echo $article->text;
?>
예제 #7
0
파일: about.php 프로젝트: Bazitron/easls
<?php

/**
 * @author: Vasya Zhuryk <*****@*****.**>
 * @version 1.0
 */
use yii\easyii\modules\article\api\Article;
$this->title = 'ЕШСС - спортивное служение';
?>
<div class="jumbotron">
    <?php 
echo Article::get('page-aboutus')->model->text;
?>
</div>

예제 #8
0
<?php

/**
 * @author: Vasya Zhuryk <*****@*****.**>
 * @version 1.0
 */
use yii\easyii\modules\article\api\Article;
$this->title = 'Другие Тренинги';
?>
<div class="jumbotron">
    <?php 
echo Article::get('page-other-trainings')->model->text;
?>
</div>