pboivin
09/28/2021, 3:29 PM@twillBlock... directives: They're actually special Twill directives, that get parsed in a first pass before Blade is actually rendered. The goal of these directives is to assemble the configuration within the block templates, instead of having to configure blocks in config/twill.php.
So if you run php artisan twill:make:block banner, this will generate a block template with directives. And in this block template, you could use your new component <a17-currency-input> without any other build necessary.`Sebastlan
09/29/2021, 10:41 AM`Sebastlan
09/29/2021, 10:42 AMhttps://i.imgur.com/LRlLM87.png▾
`Sebastlan
09/29/2021, 12:16 PM`Sebastlan
09/29/2021, 12:16 PMpboivin
09/29/2021, 2:47 PMminValues and maxValues, but maxValues is not currently implemented.user
09/29/2021, 4:47 PMuser
09/29/2021, 4:48 PMuser
09/29/2021, 4:48 PMpboivin
09/29/2021, 6:01 PMpboivin
09/29/2021, 6:01 PMparagraph and image blocks.user
09/29/2021, 6:02 PMdpadular
09/29/2021, 6:06 PMforeach through a collection of images added via a medias form field.
@formFieldset(['id' => 'images', 'title' => 'Images'])
@formField('medias', [
'name' => 'images',
'label' => 'Images',
'max' => 10,
])
@endformFieldset
$product->image('images') will give me data related to the first image, but i can't figure out how to loop through itpboivin
09/29/2021, 6:12 PM$product->images($role, $crop) that will give you something you can loop throughdpadular
09/29/2021, 6:14 PM$crop param and i wasn't getting anything from it. thanks as always @Userchrispymm
09/29/2021, 8:30 PM@twillRepeaterTitleField work on a repeater used outside of the block editor (i.e. saved using HandleJsonRepeaters trait)? I can't seem to get it to add the dynamic titlepboivin
09/29/2021, 8:31 PMpboivin
09/29/2021, 8:32 PMchrispymm
09/29/2021, 8:32 PM@twillRepeaterTitle('Contact Method')
@twillRepeaterTitleField('method')
@twillRepeaterTrigger('Add Contact Method')
@twillRepeaterGroup('app')
<x-formColumns>
<x-slot name="left">
@formField('select', [
'name' => 'method',
'label' => 'Method',
'options' => [
[
'value' => 'email',
'label' => 'Email',
],
[
'value' => 'phone',
'label' => 'Phone',
],
[
'value' => 'twitter',
'label' => 'Twitter',
],
[
'value' => 'facebook',
'label' => 'Facebook',
],
[
'value' => 'linkedin',
'label' => 'LinkedIn',
],
]
])
</x-slot>
<x-slot name="right">
@formField('input', [
'name' => 'value',
'label' => 'Value',
])
</x-slot>
</x-formColumns>chrispymm
09/29/2021, 8:33 PMpboivin
09/29/2021, 8:34 PMchrispymm
09/29/2021, 8:39 PMchrispymm
09/29/2021, 8:41 PMtitleField and hideTitlePrefix as getFormFieldsForRepeaterchrispymm
09/29/2021, 8:41 PM$repeaters[] = [
'id' => $relation . '-' . $relationItem->id,
'type' => $repeatersList[$repeaterName]['component'],
'title' => $repeatersList[$repeaterName]['title'],
'titleField' => $repeatersList[$repeaterName]['titleField'],
'hideTitlePrefix' => $repeatersList[$repeaterName]['hideTitlePrefix'],
];chrispymm
09/29/2021, 8:42 PM$repeaters[] = [
'id' => $id,
'type' => $repeatersList[$repeaterName]['component'],
'title' => $repeatersList[$repeaterName]['title'],
];pboivin
09/29/2021, 8:43 PMchrispymm
09/29/2021, 8:44 PMpboivin
09/29/2021, 8:45 PMchrispymm
09/29/2021, 8:47 PMchrispymm
09/29/2021, 8:57 PM