php - Yii2 controller render() function only render the layouts/main? -


in sitecontroller under namespace repo/controllers call

return $this->render('index'); 

it render /views/layouts/main.php need render /views/site/index.php alone layouts files.

if change

return $this->renderpartical('index'); 

it renders /views/site/index.php without problem. what's problem render() function??

please, make sure didn't missed <?= $content ?> @ layouts/main.php. should render content


Comments

Popular posts from this blog

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -