How to render section in nested view? |
I have this layout:
PHP Code: <!DOCTYPE html> In my View I have this implementation: PHP Code: <?= $this->include('App\Views\Backend\load\datatables') ?> as you can see I call layout\index to include the View in the body content. Now the problem's that inside Media\list I have a section called js: PHP Code: <?= $this->section('js') ?> and this raise an error: PHP Code: View themes, no current section urrent section current section
Oh really. I missed it.
If I understand the code correctly, in the current implementation you cannot use nested sections.
I added a PR to solve this problem. https://github.com/codeigniter4/CodeIgniter4/pull/4622
|
Welcome Guest, Not a member yet? Register Sign In |