@php $type_list = [ 'page' => 'Pagine', 'products_seasons' => 'Stagioni', 'products_categories' => 'Categorie', 'products_lines' => 'Linee', ]; $products_attributes_terms = []; if(!empty($products_attributes)){ foreach ($products_attributes as $attribute) { $attribute_terms = $attribute->get_terms(); if(!empty($attribute_terms)){ $type_list['products_attributes_' . $attribute->get_sku()] = 'Attributo ' . $attribute->get_name(); $products_attributes_terms['products_attributes_' . $attribute->get_sku()] = $attribute_terms; } } } $type_list['link'] = 'Link personalizzati'; @endphp
@foreach ($type_list as $type_id => $type_label) @php $item_check = true; if ($type_id == 'page' && empty($pages)){ $item_check = false; } if ($type_id == 'products_seasons' && empty($products_seasons)){ $item_check = false; } if ($type_id == 'products_categories' && empty($products_categories)){ $item_check = false; } if ($type_id == 'products_lines' && empty($products_lines)){ $item_check = false; } @endphp @if($item_check)

@endif @endforeach