'type' => 'Text']);
$this->addField(['name' => 'page_product',
- 'label' => 'Page produit',
+ 'label' => 'Lien vers une page produit',
'type' => 'SelectFromArray',
'options' => self::getDataByTable('catalog_products'),
'multiple' => false,
]);
$this->addField(['name' => 'page_page',
- 'label' => 'Page generale',
+ 'label' => 'Lien vers une page generale',
'type' => 'SelectFromArray',
'options' => self::getDataByTable('cubist_cms_pages'),
'multiple' => false,
]);
$this->addField(['name' => 'page_news',
- 'label' => 'Page actualités',
+ 'label' => 'Lien vers une page actualités',
'type' => 'SelectFromArray',
'options' => self::getDataByTable('cubist_news'),
'multiple' => false,
]);
+
+ $this->addField(['name' => 'page_application',
+ 'label' => 'Lien vers une page application',
+ 'type' => 'SelectFromArray',
+ 'options' => self::getDataByTable('applications'),
+ 'multiple' => false,
+ ]);
}
public function getDataByTable($table, $column = 'id') {
<content>
<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)
+ @foreach ($our_solutions_items as $key => $item)
@if(!empty($item['page_product']))
@php($prefix = 'product')
@php($link = App\Models\Product::find($item['page_product'])->getPageData()['slug'])
@elseif(!empty($item['page_page']))
@php($prefix = 'page')
- @php($link = Cubist\Backpack\app\Magic\Menu\Menu::getNavigation()->getHrefByID('page/'.$item['page_page']))
+ @php($link = App\Models\Page::find($item['page_page'])->getPageData()['slug'])
@elseif(!empty($item['page_news']))
@php($prefix = 'news')
@php($link = Cubist\Backpack\app\Magic\Menu\Menu::getNavigation()->getHrefByID('news/'.$item['page_news']))