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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -