Fetch all images in a block
How do you fetch all the images in a block? For e.g i have this block <x-twill::medias
name="slide"
label="Slide Show Image"
max=10
/>
I want to render this block into a slideshow. However this doesn't work
@foreach ($block->images('slide') as $image )
<img class="shadow-2xl" src="{{$image('highlight', 'default')}}"/>
@endforeach
Help would be appreciated.
Z
.zeenux•368d ago
Actually now that i had a look at it, it isn't storing any images
PB
Patrick Boivin•368d ago
@.zeenux Did you define the image and crop in
config/twill.php
, or in the block class?Z
.zeenux•366d ago
yes i did
1.4KMembers
View on DiscordWant results from more Discord servers?
More PostsRepeater without blocksHow do you add and render a repeater without including it in the block?Adding custom blocks to modulesHow do you add custom blocks to modules? Generally i add blocks to a module using $form->add(BlockEd$renderData returns null when trying to render nestedblocks@php
/** @var \A17\Twill\Services\Blocks\RenderData $renderData */
dd($renderData)
Fetch all models with field value of XSorry to ask such a basic question but I want to do the following....
I have a model called Work (anDisplaying Block elements on the Front Pagehow do you display block elements on the frontpage? And i don't mean the preview file. I want to accdashboard routeHello. I have a problem with dashboard config
I have a Category and CategoryArticle Models
I have aTwill Role based accessHow would i go about adding a Role based access to CMS Components and its entries. For e.g in an imaTwill assets errorHello to everyone i have an website in production builded in twill but some twill assets in there a