Nechalon
04/03/2023, 11:35 AMifox
04/03/2023, 11:54 AM$mediasParams
. If it is, it would be in twill.block_editor.crops
.Nechalon
04/03/2023, 12:21 PM@formField('block_editor', [
'blocks' => ['description-block', 'image-block']
])
It looks like this, so I think its inside config/twill. And which one is the key name to add in config? description-block
or image-block
ifox
04/03/2023, 12:25 PMifox
04/03/2023, 12:27 PMimage
you need block_editor.crops
in config/twill.php to have a image
key.Nechalon
04/03/2023, 12:33 PMmedias
field? this one is a block_editor
fieldifox
04/03/2023, 12:34 PMifox
04/03/2023, 12:34 PMifox
04/03/2023, 12:35 PMNechalon
04/03/2023, 12:36 PMNechalon
04/03/2023, 12:36 PMifox
04/03/2023, 12:36 PMifox
04/03/2023, 12:36 PMifox
04/03/2023, 12:38 PMNechalon
04/03/2023, 12:39 PM@formField('medias', [
'name' => 'cover_desktop',
'label' => __('form.cover_desktop'),
'max' => 1,
'note' => __('form.admin.blog_post.cover_desktop.min_img_width'),
{{-- 'fieldNote' => __('form.min_img_width'),--}}
'translated' => false,
'withVideoUrl' => false,
])
This is the onle medias
field.
@formField('block_editor', [
'blocks' => ['description-block', 'image-block']
])
This is what I want to edit
public $mediasParams = [
'cover' => [
'desktop' => [
[
'name' => 'desktop',
'ratio' => 16 / 9,
],
],
'mobile' => [
[
'name' => 'mobile',
'ratio' => 1,
],
],
'flexible' => [
[
'name' => 'free',
'ratio' => 0,
],
[
'name' => 'landscape',
'ratio' => 16 / 9,
],
[
'name' => 'portrait',
'ratio' => 3 / 5,
],
],
],
];
And here are the $mediasParams inside the modelifox
04/03/2023, 12:41 PMimage-block
block? If it is, you need the cover_deskop
key in your twill config file.ifox
04/03/2023, 12:42 PMNechalon
04/03/2023, 12:43 PMifox
04/03/2023, 12:43 PMNechalon
04/03/2023, 12:43 PMcover_desktop
key from twill config, clear the config cache, and its the SAMEifox
04/03/2023, 12:44 PMifox
04/03/2023, 12:44 PMifox
04/03/2023, 12:44 PMifox
04/03/2023, 12:44 PMNechalon
04/03/2023, 12:45 PMifox
04/03/2023, 12:45 PMifox
04/03/2023, 12:45 PMNechalon
04/03/2023, 12:45 PM'name' => 'cover_desktop',
ifox
04/03/2023, 12:46 PMifox
04/03/2023, 12:47 PMNechalon
04/03/2023, 12:48 PMNechalon
04/03/2023, 1:04 PMimage-block
key to the config inside block_editor -> crops, cleared cache, and no changes. It still shows desktop, tablet, mobile crops instead of "freeeee".
'image-block' => [
'free' => [
'name' => 'freeeee',
'ratio' => 4/4,
]
],
https://cdn.discordapp.com/attachments/1092412009317937172/1092434524769615932/image.png▾
https://cdn.discordapp.com/attachments/1092412009317937172/1092434525071626240/image.png▾