Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'urlManager' => array(
- 'urlFormat' => 'path',
- 'urlSuffix' => '.htm',
- 'rules' => array(
- '' => '/site/index',
- 'aktualnosci' => '/site/news',
- 'kontakt' => '/site/contact',
- 'o-firmie' => '/site/about',
- 'portfolio/<slug>' => '/portfolio/category',
- 'portfolio/<slug1>/<slug2>' => '/portfolio/view',
- )
- ),
- <?php
- class PortfolioItemController extends Controller
- {
- /**
- * @var string the default layout for the views. Defaults to '//layouts/column2', meaning
- * using two-column layout. See 'protected/views/layouts/column2.php'.
- */
- public $layout='//layouts/site';
- /**
- * @return array action filters
- */
- /**
- * Displays a particular model.
- * @param integer $id the ID of the model to be displayed
- */
- public function actionView($slug1, $slug2)
- {
- $model = PortfolioItem::model()->findByAttributes('slug' => $slug);
- if($model === null)
- throw new CHttpException(404, 'Nie znaleziono realizacji');
- $
- $this->render('view',array(
- 'model'=>$model,
- ));
- }
- public function get
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement