ifox
04/23/2023, 11:28 AMLucius Vorenus
04/23/2023, 11:43 AMTobi Wan
04/25/2023, 1:04 AM->image('image')
it seems that ->image('image')
always returns an image even when there is no image set.ifox
04/25/2023, 1:05 AM->hasImage
Tobi Wan
04/25/2023, 1:10 AMLucius Vorenus
04/25/2023, 9:06 AMA17\Twill\Models\Behaviors\HasMedias
Sorry, @ifox . I've had no questions for you the last couple of days, thanks to your patient replies the few days before. The more I see and understand Twill, the more impressive it becomes. 👍zeenux
04/25/2023, 2:30 PMSmilodown
04/26/2023, 8:01 AMSmilodown
04/26/2023, 8:05 AMhttps://cdn.discordapp.com/attachments/989876822323908608/1100694202200887296/Capture_decran_2023-04-26_a_10.03.02.png▾
Smilodown
04/26/2023, 8:30 AMkerkness
04/26/2023, 1:42 PMpublic function getSideFieldsets(TwillModelContract $model) : Form
{
$side = parent::getSideFieldsets($model);
$seoFields = Fieldset::make()->title('SEO')
->fields([
Input::make()->name('seo_title')->label('SEO Title')->translatable(),
Input::make()->name('seo_description')->label('SEO Description')->translatable()
]);
$side->add(Medias::make()->name('profile_image')->label('Profile Image'));
$side->addFieldset($seoFields);
return $side;
}
Defenestrația
05/02/2023, 6:29 PMthelongestsigh
05/02/2023, 6:46 PMNavid
05/03/2023, 10:45 AMNavid
05/03/2023, 11:44 AMkalle
05/03/2023, 12:02 PMkalle
05/03/2023, 12:02 PMkalle
05/03/2023, 12:04 PMNavid
05/03/2023, 1:13 PMjefsev
05/03/2023, 2:34 PMifox
05/03/2023, 2:50 PMifox
05/03/2023, 2:51 PMjefsev
05/03/2023, 2:53 PMpauldwight
05/04/2023, 1:19 PMphp
TwillNavigation::addLink(
NavigationLink::make()->title('Content')
->setChildren([
NavigationLink::make()->forModule('pages'),
NavigationLink::make()->forModule('articles')
])
);
At the moment I need to add forModule('pages') to the Content link which ends up with the following:
Content
- Content
- Articlesifox
05/04/2023, 2:55 PMpauldwight
05/04/2023, 3:54 PMjpolito
05/09/2023, 5:55 PMjpolito
05/09/2023, 5:55 PMphp
<div>
@foreach ($block->children as $child)
<div>
{!! $child->renderBlocks() !!}
</div>
@endforeach
</div>
Smilodown
05/10/2023, 7:29 AMNavid
05/12/2023, 4:56 AM