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/shop.komma.nl/resources/views/components/accordionList.blade.php
@php /** @var \Komma\KMS\Core\Tree\NestedSets\Nodes\TreeModelInterface $root **/ @endphp
<ul class="{{ !isset($isSubItem) ? 'c-accordion-list' : '' }}">
    @foreach($root->getChildren() as $child)
        @php /** @var \Komma\KMS\Core\Tree\NestedSets\Nodes\TreeModelInterface $child **/ @endphp
        <li class="{{ !isset($isSubItem) ? 'c-accordion-list__item' : '' }}">
            <a class="{{ !isset($isSubItem) ? 'c-accordion-list__link ' : '' }}{{ $child->is_current ? 'is-current': ''}}"
               href="{{ $child->link }}"
                @if($child->is_current)
                    data-test="current-assortment-menu-item" @else
                    data-test="assortment-menu-item"
                @endif
            >
                {{ $child->translation ? $child->translation->name : '-' }}
            </a>
            @if(count($child->getChildren()) > 0)
                @include('components.accordionList', [
                    'root' => $child,
                    'isSubItem' => true,
                ])
            @endif
        </li>
    @endforeach
</ul>