Sami
08/31/2022, 2:30 PMHarings Rob
08/31/2022, 2:31 PMHarings Rob
08/31/2022, 2:32 PMphp
- `renderHtml(bool $html = true)`: If the cms should render the contents as html. (Be careful when using this with
unprotected data sources.)
- `customRender(Closure $renderFunction)`: A closure with a custom render function instead of using the raw field value.
- `linkCell(Closure|string $link)`: A closure or string on where to link the field contents to.Harings Rob
08/31/2022, 2:32 PMHarings Rob
08/31/2022, 2:32 PMSami
08/31/2022, 2:37 PMrenderHtml to false, still linking
whatever customRender returns, still link
tried to return null in linkCell, still leads to edit form 😅kalle
08/31/2022, 2:41 PMname
php
public function getNewNameAttribute()
{
return $this->attributes['name'];
}Harings Rob
08/31/2022, 2:46 PMSami
08/31/2022, 2:46 PMname column is the problem 😅 I thought it has something to do with titleColumnKeySami
08/31/2022, 2:46 PMkalle
08/31/2022, 2:53 PMindexColumns contain table column name?Sami
08/31/2022, 2:55 PMname to something else and the links are gone
indexColumn was renamed but seems like it doesn't have any impact on the linksHarings Rob
08/31/2022, 2:56 PMSami
08/31/2022, 3:36 PMblock_editor context, $block->image('role', 'crop') doesn't find the media. However outside of the context it works correctly. Can this be related to Twill 3?
I noticed the $block only has type, content and editor_name attributes. Maybe that's why it can't load relationships correctly?Harings Rob
08/31/2022, 4:21 PMSami
08/31/2022, 4:43 PMHarings Rob
08/31/2022, 4:44 PMSami
08/31/2022, 4:49 PMphp
'block_editor' => [
'use_twill_blocks' => [],
'crops' => \App\Utilities\Crops::BLOCK_EDITOR,
],
Crops
php
const BLOCK_EDITOR = [
'text_image' => self::ORIGINAL,
'gallery' => self::LANDSCAPE,
];
Block (text.blade.php)
php
<x-twill::medias
name="text_image"
label="Image"
note="..."
/>
this line $block->image('text_image', 'original', ['q' => 100, 'w' => 800]) returns blank image (in block editor context)
however the image seems to be saved correctly in database and is also loaded to the form preview. And can be loaded outside the block editoronepiece
09/01/2022, 12:36 PMonepiece
09/01/2022, 12:36 PMonepiece
09/01/2022, 12:36 PMonepiece
09/01/2022, 12:37 PMonepiece
09/01/2022, 12:38 PMifox
09/01/2022, 12:44 PMifox
09/01/2022, 12:44 PMifox
09/01/2022, 12:45 PMa17-onepiece
09/01/2022, 12:46 PMifox
09/01/2022, 12:46 PM<a17-app-leads>