namespace App\SubForms;
+use App\Models\Product;
use Cubist\Backpack\app\Magic\SubForm;
+use App\Models\Application;
class OurSolutionsUSP extends SubForm
{
$this->addField(['name' => 'page',
'label' => 'Lien vers',
- 'type' => 'PageInternal']);
+ 'type' => 'SelectFromModel',
+ 'optionsmodel' => 'App\Models\Product',
+ 'multiple' => false,
+ 'attribute' => 'name',
+ ]);
}
}
<text-block :title="__('Nos solutions')" title-class="h1 text-inherit" />
<grid cols="3" class="sm:grid-cols-2 xs:grid-cols-1">
@foreach ($our_solutions_items as $item)
+ @isset($item['page'])
<div class="">
- <a href="{{ $nav->getHrefById($item['page']) }}">
+ <a href="{{ $nav->getHrefById('product/'.$item['page']) }}">
<div class="bg-cover mb-8" style="padding-bottom: 56.25%; background-image: url({{ $page->getImageURLbyCollection($item['image']) }})">
</div>
</a>
<a href="{{ $nav->getHrefById($item['page']) }}">{{ __('Découvrir') }}</a>
</div>
</div>
+ @endisset
@endforeach
</grid>
</content>