![]() |
No direct output from $this->renderSection - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29) +--- Thread: No direct output from $this->renderSection (/showthread.php?tid=91082) |
No direct output from $this->renderSection - minsk832 - 06-13-2024 In the help itself, <?= is used already. Nevertheless, the function renderSection outputs the content directly via echo. It would be helpful if the value was only returned or if it could at least be controlled via a parameter. This would have the advantage that, for example, if a page title is not set, you could maintain a standard for example with ?: parameter. Code: <title><?= $this->renderSection('title') ?></title> Code: <title><?= $this->renderSection('title') ?: 'Fallback title' ?></title> RE: No direct output from $this->renderSection - kenjis - 06-14-2024 I sent PR https://github.com/codeigniter4/CodeIgniter4/pull/8965 RE: No direct output from $this->renderSection - kenjis - 06-23-2024 The PR has been merged. So this bug will be fixed in v4.6.0. RE: No direct output from $this->renderSection - minsk832 - 06-24-2024 Thank you very much for the implementation and consideration! You are great! :-) |