Сообщение
rosswe »
main.php
['label' => 'Home', 'url' => ['/site/index']],
['label' => 'About', 'url' => ['/site/about']],
['label' => 'Contact', 'url' => ['/site/contact']],
['label' => 'Family', 'url' => ['/site/family']],
['label' => 'Me', 'url' => ['/site/'me']],
//controllers/SiteController.php
public function actionFamily()
{
return $this->render('family');
}
public function actionMy()
{
return $this->render('me);
}
//
views/site/my.php
<?php
$str="Это страница my.php";
echo $str;
?>
//
views/site/family.php
<?php
$str="Это страница family.php";
echo $str;
?>