Welcome Guest, Not a member yet? Register   Sign In
Issue with layouts renderer and sections => merge sections in one view
#1
Bug 
(This post was last modified: 01-16-2020, 06:17 AM by RedskyThirty.)

Hello,

It seems that there is a problem with the layouts and I think that this is due to "ob_start / ob_flush / ..." in the renderer.
It will be easier to explain my problem with an example...

PHP Code:
public function send(): string
{
    $email view('email');
   
    
// Send email script here...

    return view('confirmation');


View "email" extends a layout "x" with a section called "body".
View "confirmation" extends another layout "y" with a section called "body".

Sometimes (but not always), "view('confirmation')" displays the "body" section of "email" and "confirmation". The renderer merges both sections even if the layout is not the same.
This is really annoying. For the moment, I try to prefix all my sections in each layouts but it would be better if I didn't have to do this kind of things.
Reply
#2

Good point. PLease log that over at Github.
Reply
#3

(01-16-2020, 08:15 AM)kilishan Wrote: Good point. PLease log that over at Github.

Done ;-)
Reply
#4

Thanks!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB