Support the ongoing development of Laravel.io →
posted 9 years ago
Views Blade
Last updated 2 years ago.
0

I have the same issue, anyone found a solution ?

Last updated 2 years ago.
0

Also I read about the @override command, but I can't really use it with @section('header', 'text') can I?

Last updated 2 years ago.
0

Try to use @append to close the section.

Last updated 2 years ago.
0

It doesn't work in my case because I have to use the syntax

@section('div-id', 'test_id')

The reason I have to use this syntax is because the other syntax adds white-spaces before and after the content, which causes issues with css and javascript.

I posted about it here: http://laravel.io/forum/10-20-2014-blade-problem-with-layouts

Last updated 2 years ago.
0

Maybe this can help you...

$view1 = View::make('popup1');
$kittySections = $view1->renderSections();//gets array of sections
$view2 = View::make('popup2');
$monkeySections = $view2->renderSections();//gets array of sections

$together = View::make('together')
->with('kittySections', $kittySections)//making $kittySections awailable in the view as $kittySections
->with('monkeySections', $monkeySections);

Iside the together.blade.php just echo the needed section where you want

<h1>Kitties</h1>
{{ $kittySections['section1'] }}
{{ $kittySections['section2'] }}

<h1>Monkeys</h1>
{{ $monkeySections['section1'] }}
{{ $monkeySections['section2'] }}
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Meowts meowts Joined 10 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.