]> _ Git - pmi.git/commitdiff
wait #7115 @00:20
authorsoufiane <soufiane@cubedesigners.com>
Wed, 2 Oct 2024 09:15:51 +0000 (11:15 +0200)
committersoufiane <soufiane@cubedesigners.com>
Wed, 2 Oct 2024 09:15:51 +0000 (11:15 +0200)
app/SubForms/OurSolutionsUSP.php
resources/views/pages/our_solutions.blade.php

index 970395043f78de7be3e56845b1c598223adae205..5f93ffc3cd5ade0cea4b182b8f2603c2e89ac026 100644 (file)
@@ -3,7 +3,9 @@
 namespace App\SubForms;
 
 
+use App\Models\Product;
 use Cubist\Backpack\app\Magic\SubForm;
+use App\Models\Application;
 
 class OurSolutionsUSP extends SubForm
 {
@@ -28,6 +30,10 @@ class OurSolutionsUSP extends SubForm
 
         $this->addField(['name' => 'page',
             'label' => 'Lien vers',
-            'type' => 'PageInternal']);
+            'type' => 'SelectFromModel',
+            'optionsmodel' => 'App\Models\Product',
+            'multiple' => false,
+            'attribute' => 'name',
+        ]);
     }
 }
index cfd9f7f7400500abaf5a96f40552f9f270f23024..e46fefe27a9ab753e009ad3f039eb515c886d8b9 100644 (file)
             <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>