public function actionView($id)
 {
     $model = $this->loadModel($id);
     $page = $model->page;
     //set page title
     Yii::app()->getController()->pageTitle = $page->title . Awecms::getTitlePrefix();
     //increase view count
     $model->increaseViewCount();
     $this->render('view', array('model' => $model));
 }
Exemple #2
0
 public function actionView($id)
 {
     $page = $this->loadModel($id);
     //set page title
     Yii::app()->getController()->pageTitle = $page->title . Awecms::getTitlePrefix();
     if (Yii::app()->hasModule('tag') && Settings::get('SEO', 'use_page_tags_for_keywords')) {
         $this->pageKeywords = implode(', ', $page->getTags());
     }
     //increase view count
     $page->increaseViewCount();
     $this->render('view', array('page' => $page));
 }
Exemple #3
0
 public function actionView($id)
 {
     $baseUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.modules.event.assets'));
     Yii::app()->getClientScript()->registerCssFile($baseUrl . '/events.css');
     $model = $this->loadModel($id);
     $page = $model->page;
     //set page title
     Yii::app()->getController()->pageTitle = $page->title . Awecms::getTitlePrefix();
     //increase view count
     $model->increaseViewCount();
     $this->render('view', array('model' => $model));
 }
Exemple #4
0
 public function actionView($id)
 {
     $this->webpageType = 'ImageGallery';
     $baseUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.modules.gallery.assets'));
     Yii::app()->getClientScript()->registerCssFile($baseUrl . '/gallery.css');
     $images = Image::model()->findAllByAttributes(array('album_id' => $id));
     $model = $this->loadModel($id);
     $page = $model->page;
     //set page title
     Yii::app()->getController()->pageTitle = $page->title . Awecms::getTitlePrefix();
     //increase view count
     $model->increaseViewCount();
     $this->render('view', array('model' => $model, 'images' => $images));
 }
Exemple #5
0
<?php

$this->pageTitle = $model->name . Awecms::getTitlePrefix();
$this->breadcrumbs = array(Yii::t('app', 'All Tags') => array('/tag'), Yii::t('app', $model->name));
if (!isset($this->menu) || $this->menu === array()) {
    $this->menu = array(array('label' => Yii::t('app', 'View')), array('label' => Yii::t('app', 'All Tags'), 'url' => array('/tag')), array('label' => Yii::t('app', 'Delete This Tag'), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')));
}
?>

<h1><?php 
echo $model->name;
?>
</h1>

<?php 
if (count($model->pages)) {
    ?>
    <ul>
        <?php 
    if (is_array($model->pages)) {
        foreach ($model->pages as $foreignobj) {
            echo '<li>';
            echo CHtml::link($foreignobj->title, array('/page/page/view', 'id' => $foreignobj->id));
        }
    }
    ?>
</ul>
<?php 
}
 public function actionView($id)
 {
     $model = $this->loadModel($id);
     $this->pageTitle = $model->name . ' - ' . Yii::t('app', 'Categories') . Awecms::getTitlePrefix();
     $this->render('view', array('model' => $model));
 }