}
$this->data['title'] = $productType->name;
- $this->data['title'] = $productType->name;
- $this->data['product_type'] = $productType->getPageData();
+
+ $this->data['page'] = $this->data['product_type'] = $productType->getPageData();
$this->data['products'] = [];
$products = Product::where('product_type', $id)->where('online', 1)->get();
foreach ($products as $item) {
]
);
+ $this->addField([
+ 'name' => 'intro',
+ 'type' => 'BunchOfFields',
+ 'bunch' => 'App\SubForms\Intro',
+ 'label' => __('Introduction'),
+ ]);
+
$this->addField(['name' => 'specifications',
'label' => 'Spécifications',
'type' => 'SelectFromModel',
'optionsmodel' => 'App\Models\Specification',
'order' => true,
'multiple' => true]);
+
+
}
}
--- /dev/null
+.template-text
+ .container
+ .markdown
+ max-width 800px
+ margin 0 auto
@php
//#### Generate temporary cart data
$cart_items = [];
+ if(config('features.quote')){
for ($i = 1; $i <= 6; $i++) {
$cart_items[$i] = [
'id' => $i,
'image' => '/storage/products/'. rand(1,6) .'.png',
];
}
+}
@endphp
<div id="app" class="flex flex-col min-h-screen" data-cart-items='@json($cart_items)'>
@extends('layouts/app')
@section('content')
- <full-width padding="pb-1v">
- <content>
- <columns>
- <column>
- <img src="{{ asset('storage/uploads/images/products-intro.jpg') }}" alt="">
- </column>
-
- <column>
- <text-block class="pt-2v" title-tag="h1" title-class="h1 overlap-left" :title="$title">
-
- <p>
- La mesure de force se réalise avec les capteurs de force ou des cellules de charge. Ils sont
- constitués d'un corps d'épreuve sur lequel sont collées des jauges de contrainte. La mesure
- de force s'exprime en Newton.
- </p>
- </text-block>
-
- </column>
- </columns>
- </content>
-
- </full-width>
+ @intro()
<full-width class="bg-grey-100" padding="pt-1v pb-2v">
<content class="flex relative items-start">
// $name is the name of the page data to fetch. If it's not set, assume it is 'intro'
$name = $name ?? 'intro';
- $title = \Illuminate\Support\Str::ucfirst($page->get("$name.title", ''));
- $image = $page->getImageURL("$name.image");
+ $title = \Illuminate\Support\Str::ucfirst($page->get("$name.title", $page->get("name")));
+ $image = $page->getImageURL("$name.image",'',asset('storage/uploads/images/products-intro.jpg'));
$class = $class ?? '';
$padding = $padding ?? null; // Pass null so it doesn't override default padding
@endphp