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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -