Hey guys,
I created a controller 'PageController.php' with a default action 'actionShow' like this:
public function actionShow( $slug = '' ) {
if ( empty( $slug ) ) {
$model=Pages::model()->findByAttributes( array( 'slug' => 'accueil' ) );
}
else {
$model = Pages::model()->find('slug = :slug', array(':slug' => $slug));
if($model===null) {
throw new CHttpException(404,'The requested page does not exist.');
}
}
$this->render('page', array(
'model' => $model,
'slug' => $slug,
));
}
Then I created a module (and this is where things g