Do you have any tips for the best way to structure partial views? |
Hi,
I'm reading about renderSection(), but it seems a bit confusing for me. I don't get its workflow and how it really works. Do you have any tips or know any good tutorial about it? Thanks.
Views/parent.php
PHP Code: <h1>Child: <?=$this->renderSection('child')?></h1> Views/child-a.php PHP Code: <?= $this->extend('parent') ?> Views/child-b.php PHP Code: <?= $this->extend('parent') ?> Now PHP Code: view('child-a') // <h1>Child: AAAAAAA</h1>
Is there something difficult to understand?
View Layouts — CodeIgniter 4.1.7 documentation https://codeigniter4.github.io/userguide...youts.html |
Welcome Guest, Not a member yet? Register Sign In |