Actions on Custom Widgets on resource page
Hello, is it possible to make the actions visible on a custom widget?
I successfully create a page like on the screenshot.
But I want to make a view like the 2nd screenshot.
Is it possible?
When I return title as empty string my actions are disappearing also.
7 Replies
Or is there a way I can return a custom widget source to getTitle of the page?
I don't think there's an easy way to do exactly what you want but if your actions are mostly links to other sections (eg. create, print, etc.), you could include them as simple buttons in your widget template :
And remove the default actions from your ListRecords page :
Thanks for your answer.
I considered to do it like that, however I have already made a slideOver modal to complete the actions already :/
Do you know any quick support to open modals from widget button?
I'm not sure if it is the best way, but you could duplicate the files:
vendor/filament/filament/resources/views/resources/pages/list-records.blade.php
vendor/filament/filament/resources/views/components/page.blade.php
modify and use in the page. Ex:
But take a look: https://filamentphp.com/blog/publishing-views-in-laravel
Filament
Publishing views in Laravel can be dangerous - how to stay safe by ...
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.
Regards this question, you can try: https://filamentphp.com/tricks/opening-a-modal-in-a-blade-with-button-outside-its-trigger-slot
Filament
Opening a modal in a blade with button outside it's trigger slot by...
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.
Thank you, I will try opening a modal in a blade.
The first suggestion looks dangerous maybe, but I will give it a try too.
These Helped a lot, cheers
add a filament card