Kormi
03/29/2022, 10:07 AM$page = app(PageRepository::class)->forSlugPreview($path[0])->firstOrFail();ifox
03/29/2022, 10:09 AMcookie-policy in database?Kormi
03/29/2022, 10:10 AMKormi
03/29/2022, 10:10 AMifox
03/29/2022, 10:10 AMKormi
03/29/2022, 10:15 AM23r01nf1n17y
03/29/2022, 10:40 AM@formField('block_editor'... section but only get displayed Image and Body Text in my Block Editor.
❓ What am I doing wrong? How do I get all blocks? Couldn't find anything in the docs nor with google. Thanks
@extends('twill::layouts.form')
@section('contentFields')
@formField('input', [
'name' => 'description',
'label' => 'Description',
'maxlength' => 100,
])
@formField('block_editor', [
'blocks' => [
'carousel',
'footnote',
'gallery',
'image',
'quote',
'text',
'hero', // my custom block
],
])
@stopifox
03/29/2022, 10:41 AMconfig('twill.use_twill_blocks')ifox
03/29/2022, 10:42 AMifox
03/29/2022, 10:44 AM23r01nf1n17y
03/29/2022, 10:45 AM23r01nf1n17y
03/29/2022, 10:46 AMifox
03/29/2022, 10:46 AMimage() and a bunch of other rendering helpers on your models. We also have #873445927740903475 which will do all the heavy lifting regarding responsive rendering of Twill crops for you. Browsers and repeaters are standard Laravel relationship that you can loop over, or use the getRelated() helper if you are using the HasRelated trait to save your browser.Kormi
03/29/2022, 2:44 PMifox
03/29/2022, 3:04 PMKormi
03/29/2022, 3:15 PMifox
03/29/2022, 3:16 PMifox
03/29/2022, 3:16 PMroute('page.show', $page->slug)rescarcega
03/29/2022, 3:17 PMifox
03/29/2022, 3:18 PMifox
03/29/2022, 3:18 PMKormi
03/29/2022, 3:19 PMKormi
03/29/2022, 3:21 PM$events_related = $page->getRelated('events_related'); i get related browser EVENT
so
foreach($events_related as $event){
if(!$event->active){
continue;
}
var_dump($event->active);
var_dump($event->title);
var_dump($event->description);
echo '<a href="'.PERMALINK .'">'. $event->title .'</a>';
}Kormi
03/29/2022, 3:21 PMKormi
03/29/2022, 3:21 PMKormi
03/29/2022, 3:22 PMKormi
03/29/2022, 3:24 PMprotected function form($id, $item = null)
{
$item = $this->repository->getById($id, $this->formWith, $this->formWithCount);
if (isset($item->category->slug) && $item->category->slug) {
$this->permalinkBase .= "/" . $item->category->slug;
}
return parent::form($id, $item);
}
for example if slug-english have category "category1" the permalink will be /en/event/category1/slug-englishKormi
03/29/2022, 3:24 PMifox
03/29/2022, 3:25 PMifox
03/29/2022, 3:25 PM