HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/douven.komma.pro/resources/views/site/partials/sitemapLoop.blade.php
@if($sitemapItem->active)

    <li>
        <a href="/{{$links->{$sitemapItem->code_name}->route}}">{{$links->{$sitemapItem->code_name}->name}}</a>
    </li>

    {{-- Check if sitemap item is all the end of the tree branch --}}
    @unless($sitemapItem->rgt == $sitemapItem->lft+1 || $sitemapItem->code_name == "references" || $sitemapItem->code_name == "categories")

        {{-- Check if the sitemap item has children --}}
        <?php $children = $sitemapItem->findChildren(); ?>
        @if(sizeof($children) != 0)

            {{-- If it does, recall this blade with the found child as item --}}
            <ul>
                @foreach($children as $child)
                    @include('site.partials.sitemapLoop', ['sitemapItem' => $child])
                @endforeach
            </ul>
        @endif

    @endunless

    @if($sitemapItem->code_name == 'categories')
        <ul>
            @foreach($categoryTree[0]->getChildren() as $key => $catItem)
                <li {{!empty($category) && $category->code_name == $catItem->node->code_name ? 'class=active' : ''}}>
                    <a href="/aanbod/{{$catItem->node->translation->slug}}">
                        {{$catItem->node->translation->name}}
                    </a>
                </li>
            @endforeach
            <li>
                <a href="/aanbod/transportservice">
                    {{$links->transportservice->node->translation->name}}
                </a>
            </li>
        </ul>
    @endif

@endif