Welcome Guest, Not a member yet? Register   Sign In
extend layout
#11

Sorry, I got misunderstood.

> since renderSection ($sectionName) does not return any value

It means renderSection() returns null. Use if else statements in your layout properly.
Reply
#12

(This post was last modified: 11-16-2021, 09:02 AM by nemesis.)

(11-16-2021, 01:16 AM)kenjis Wrote: Sorry, I got misunderstood.

> since renderSection ($sectionName) does not return any value

It means renderSection() returns null. Use if else statements in your layout properly.

renderSection() always return null: if it was used, it echo something then return (without explicit call to return); if it is not used, it is run return only

so, I can't do what you suggest...
Reply
#13

Ahha, I got you! Sorry, again. You're correct.

> if a layout can define a default behavior that is used when the section is not defined in the view extension.

Therefore, the answer is "no, you can't".
A layout is not a view.
Reply
#14

(This post was last modified: 11-17-2021, 11:03 AM by nemesis.)

(11-16-2021, 03:58 PM)kenjis Wrote: Ahha, I got you! Sorry, again. You're correct.

> if a layout can define a default behavior that is used when the section is not defined in the view extension.

Therefore, the answer is "no, you can't".
A layout is not a view.

it is a pity that this is not possible!

I hope it can be implemented in a future version. how can I suggest it?

anyway, thanks for the support
Reply




Theme © iAndrew 2016 - Forum software by © MyBB