mateoD
06/13/2022, 10:34 AMmateoD
06/13/2022, 10:36 AMdedli
06/13/2022, 11:38 AM@foreach(LaravelLocalization::getSupportedLocales() as $localeCode => $properties) <li class="language__item"><a class="language__link" href="{{ LaravelLocalization::getLocalizedURL($localeCode, null, [], true) }}" rel="alternate" hreflang="{{ $localeCode }}" class="language__link {{App::getLocale()==$localeCode?'active':''}}">{{ $localeCode=='uk'?'UA':strtoupper($localeCode) }}</a> </li>@endforeach
I get url without slugs translation, only adds language prefixdedli
06/13/2022, 11:46 AMmateoD
06/13/2022, 12:30 PMafatmustafa
06/13/2022, 12:38 PMmateoD
06/13/2022, 12:45 PMdedli
06/13/2022, 2:46 PMifox
06/13/2022, 2:47 PMdedli
06/13/2022, 4:57 PMdedli
06/13/2022, 5:53 PMRoute::get(LaravelLocalization::transRoute('routes.personal'), [PageController::class,'index'])->name('personal');
But all routes in group works wrong with switcher:kalle
06/13/2022, 9:37 PM@dd($form_fields)
show right value but component gets original field value?ifox
06/13/2022, 9:39 PMkalle
06/13/2022, 9:39 PMifox
06/13/2022, 9:40 PMifox
06/13/2022, 9:40 PMifox
06/13/2022, 9:41 PMkalle
06/13/2022, 9:41 PMkalle
06/13/2022, 9:41 PMifox
06/13/2022, 9:47 PM$item
, you'd need to either use an accessor, or you could override form()
in the controller or getById()
in the repository to set it on the model before it gets to the form. or you could push into the store with some inline js. none of those is super clean but there are options.ifox
06/13/2022, 9:47 PMifox
06/13/2022, 9:48 PMkalle
06/13/2022, 9:50 PMdedli
06/13/2022, 10:28 PMifox
06/13/2022, 11:06 PMdedli
06/14/2022, 11:26 AMbmau
06/14/2022, 12:29 PMphp artisan twill:make:block paragraph-two-third-column
admin/blocks/paragraph-two-third-column.blade.php
@twillBlockTitle('Paragraph Two Third Column')
@twillBlockIcon('text')
@twillBlockGroup('app')
@formField('input', [
'name' => 'title',
'label' => 'Title',
'translated' => true,
])
@formField('wysiwyg', [
'name' => 'text',
'label' => 'Text',
'placeholder' => 'Text',
'toolbarOptions' => [
'bold',
'italic',
['list' => 'bullet'],
['list' => 'ordered'],
[ 'script' => 'super' ],
[ 'script' => 'sub' ],
'link',
'clean'
],
'translated' => true
])
sites/blocks/paragraph-two-third-column.blade.php
<div>
<h1>{{$block->input('title')}}</h1>
<p>{{$block->input('text')}}</p>
</div>
This results in an error when using the preview function for this page in the cms admin
"message": "htmlspecialchars(): Argument #1 ($string) must be of type string, array given (View: .../site/blocks/paragraph-two-third-column.blade.php)"
ifox
06/14/2022, 12:35 PM$block->translatedInput('title')
bmau
06/14/2022, 12:36 PM