Exemple #1
0
 public function actionIndex()
 {
     //$page = Pages::find()->where(['id' => $_GET['p']])->one();
     $cat = \backend\modules\category\models\Category::find()->where(['id' => $_GET['c']])->one();
     //$content = $this->getBlocks($cat);
     //$con = $this->render('index', ['content' => $content, 'page' => $cat]);
     Template::get_header($cat);
     $this->getBlocks($cat);
     Template::get_footer();
 }
Exemple #2
0
 public function actionIndex()
 {
     //$page = Pages::find()->where(['id' => $_GET['p']])->one();
     $page = Pages::find()->where(['id' => $_GET['p']])->one();
     //$content = $this->getBlocks($page);
     //$content = $this->getBlocks($page);
     //$con = $this->render('index', ['content' => $content, 'page' => $page]);
     Template::get_header($page);
     $this->getBlocks($page);
     Template::get_footer();
 }
Exemple #3
0
 public function actionIndex()
 {
     $options = Options::find()->where(['key' => 'mainpage'])->one();
     $pageId = $options->value;
     $page = Pages::find()->where(['id' => $pageId])->one();
     //$content = $this->getBlocks($page);
     //$con = $this->render('index', ['content' => $content, 'page' => $page]);
     Template::get_header($page);
     $this->getBlocks($page);
     Template::get_footer();
 }
Exemple #4
0
    }
}
foreach ($sortDefault as $sd) {
    if ($sd[0] == 'y') {
        $name = explode('_', $sd);
        $name = \common\models\Block::find()->where(['id' => $name[1]])->one();
        $name = $name->name;
        echo '<li class="noPublick sortAll" data-type="' . $sd . '">' . $name . ' | <a class="toPublick" href="#">Опубликовать</a> | <a class="delCustBlock" href="#">Удалить</a></li>';
    } elseif ($sd[0] == 'i') {
        $blockId = explode('_', $sd);
        $blockId = $blockId[1];
        $block = \common\models\Block::find()->where(['id' => $blockId])->one();
        $name = $block->name;
        echo '<li class="noPublick sortAll" data-type="' . $sd . '">Индивидуальный блок (' . $name . ') | <a class="toPublick" href="#">Опубликовать</a> | <a href="#" data-block-id="' . $blockId . '">Редактировать</a> | <a data-confirm="Удалить блок?" class="delCustBlock" href="#">Удалить</a></li>';
    } else {
        $name = \common\classes\Template::getBlockName($sd);
        echo '<li class="noPublick sortAll" data-type="' . $sd . '">' . $name . ' | <a class="toPublick" href="#">Опубликовать</a></li>';
    }
}
?>
                </ul>
            </div>
        </div>
        <div id="panel3" class="tab-pane fade <?php 
echo $tabContent3;
?>
">
            <h3>SEO</h3>
            <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>