예제 #1
0
 public function actionElement($param)
 {
     $paramArr = explode("/", $param);
     $paramArr = array_pop($paramArr);
     $model = Stock::model()->findByPk($paramArr);
     if (empty($model)) {
         throw new CHttpException(404, 'The page can not be found.');
     }
     //Титл и SEO
     $this->setSEO(Yii::app()->request->requestUri, 'Статьи', $model);
     //Смотрим, нужно ли вставить фотогалерею
     $model->description = $this->addPhotogalery($model->description);
     Pages::returnUrl(4);
     $this->render('view', array('model' => $model));
 }
예제 #2
0
.<?php 
        echo $data->image;
        ?>
">                       
                </figure>
                <?php 
    }
    ?>
                <article>
                        <div style="color:#AB1129"><?php 
    echo Press::model()->getDate($data->maindate);
    ?>
</div>
                        <div class="press_name">
                             <a href="<?php 
    echo Pages::returnUrl($data->id);
    ?>
"><?php 
    echo $data->name;
    ?>
</a>
                        </div>                        
                        <p >
                            <?php 
    echo $data->brieftext;
    ?>
                        </p>                          
                </article>                                  
            </div>
            <div class="clear"></div>
            <?php