File: D:/HostingSpaces/SBogers10/helder.komma.pro/resources/views/shop/pages/categories/show.blade.php
@extends('site.master')
@section('title', $category->meta_title)
@section('meta_description', $category->meta_description)
@section('content')
<section class="content">
<h1>{{$category->title}}</h1>
@if(count($category->findChildren()) > 0)
<div class="grid-col products">
@foreach($category->findChildren() as $subkey => $subcategory)
<div class="product">
{{-- Temp. implementation --}}
@if(!empty($subcategory->translation->slug))
<a href="/nl/categorieen/{{ !empty($subcategory->translation->slug) ? $subcategory->translation->slug : $subcategory->title }}">
<div class="img-holder" style="
@if(count($subcategory->images) > 0)
background-image: url('{{$subcategory->images[0]->medium_image_url}}')
@else
background-color: #eeeeee;
@endif
">
</div>
<h3>Bekijk producten →</h3>
<h4>{{ !empty($subcategory->item->translation->title) ? $subcategory->translation->title : $subcategory->title }}</h4>
</a>
@endif
</div>
@endforeach
</div>
@else
@if(count($category->items()) > 0)
@include('shop.partials.itemsGridLoop', ['products' => $category->items(), 'parentlink' => $links->products->route])
@else
<div class="grid-col">
Er zijn (nog) geen producten in deze categorie
</div>
@endif
@endif
</section>
@endsection