Welcome Guest, Not a member yet? Register   Sign In
No direct output from $this->renderSection

(This post was last modified: 06-13-2024, 09:29 AM by minsk832.)

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.

<title><?= $this->renderSection('title') ?></title>

<title><?= $this->renderSection('title') ?: 'Fallback title' ?></title>

I sent PR https://github.com/codeigniter4/CodeIgniter4/pull/8965

The PR has been merged. So this bug will be fixed in v4.6.0.

(This post was last modified: 06-24-2024, 11:45 AM by minsk832.)

Thank you very much for the implementation and consideration! You are great! :-)

Theme © iAndrew 2016 - Forum software by © MyBB