Add a notice to the top of a table page
I'd like to add a Shout (https://filamentphp.com/plugins/awcodes-shout) to the top of a resource page (i.e. a table listing), but this doesn't seem to be an option. Is there another way to achieve this?
For example, in the screenshot attached, I'd like to show a notice above or below the "Airtable Accounts" heading
Filament
Shout by Adam Weston - Filament
A simple inline contextual notice for Filament Forms, basically just a fancy placeholder.
Solution:Jump to solution
In the end I did it as middleware on hte panel as I needed to do things based on the user's Auth status
```php
->authMiddleware([
Authenticate::class,...
20 Replies
You could add a table header widget instead with your own styling.
So shout is only for forms, what you want to do is use a render hook 😉
Or Denis approach
Not possible with the plugin at the moment. But it is planned now that widgets are configurable in v3.
@toeknee_iom Thank you, hooks look like the solution. However, the documentation isn't clear where in a service provider the render hooks go. This is a common theme I'm finding wiht the docs, where it doesn't give an example in context :/
Did you read:
To register render hooks, you can call FilamentView::registerRenderHook() from a service provider or middleware.
yep, but it doesnt say whether it goes in a boot function 🙂
It doesn't, because it's a given 😉 but I see your point
Still learning I suppose! I've tried doing this, but I get errors about the $scope
Error: Unknown named parameter $scopes
Any ideas what I might be doing wrong?
Are you on V3?
yep
Actually I don't
lol
I'm on a beta version, will try upgrading to the released v3
Definitely upgrade
also I think you can do this in the AdminPanelProvider.php
as ->renderHook()
oohhh, ok, cool - will take a look at that 🙂
thanks for your help!
Not tested it, but theory on the PanelProvider.php (likely AdminPanelProvider.php):
fab, thank you, will give it a go!
Solution
In the end I did it as middleware on hte panel as I needed to do things based on the user's Auth status
Middleware
Thanks again for all the help!
Good work!