File: D:/HostingSpaces/SBogers110/franciscaansebeweging.nl/app/views/layouts/pages/about.blade.php
@extends('layouts.master', ['view' => 'about'])
@section('sideHeader')
@include('layouts.partials.about.subMenu')
@endsection
@section('editable_content')
<div class="after-menu">
@include('layouts.partials.header')
{{--
We use a custom dynamic loop
because there is additonal check in here
and content-page block of dynamic page is smarter then needed
--}}
<section class="main-content">
{{--
Create custom counter,
because can't use the key of the foreach loop
--}}
<?php $key = 0; ?>
{{--
Loop through dynamic blocks
Skip blocks where
where the status is false
and where the code_name has been defined
--}}
@if(isset($page->content))
@foreach($page->content->translation->description as $block)
@if($block->status && isset($block->code_name) && $block->code_name == '')
{{--
Show Subscribe row for newsletter
when leaf is even and 2 blocks have been added
or when leaf is odd and 4 blocks have been added
--}}
@if( ($key == 2 && ($page->lft % 2 == 0)) || ($key == 4 && ($page->lft % 2 == 1)) )
@include('layouts.partials.newsletterRow', ['nextKey' => ($key + 1)])
@endif
{{--
Show Webshop row
when leaf is even and 4 blocks have been added
or when leaf is odd and 2 blocks have been added
--}}
@if( ($key == 4 && ($page->lft % 2 == 0)) || ($key == 2 && ($page->lft % 2 == 1)))
@include('layouts.partials.webshopRow', ['nextKey' => ($key + 1)])
@endif
{{--
Increase custom key counter
and append an about dynamic block
--}}
<?php $key++; ?>
@include('layouts.partials.'.$block->typeSlug)
@endif
@endforeach
@else
Make block with the code_name: {{$page->code_name}}.<br/>
With and dynamic block where the code_name is 'header'.
@endif
<a href="#top" class="internalLink return-top">
@lang('translations.returnTo')
</a>
</section>
<div class="mobile-submenu">
@include('layouts.partials.about.subMenu')
</div>
@include('layouts.partials.becomeMemberOrFriend')
</div>
@endsection