It looks like you’ve hit a common stumbling block with Filament’s widget placement order on View pages. By default, getFooterWidgets() in a ViewRecord page displays widgets after all relationship managers—which is why your widget is appearing below the relationships section.
Why is this happening?
Filament’s ViewResource page layout sections are rendered in the following order:
- Header actions
- Header widgets (from getHeaderWidgets)
- Main content
- Footer widgets (from getFooterWidgets)
- Relations (from getRelations)
But on View pages, the “footer widgets” actually render after the relationships section, not between content and relations. This has been a somewhat confusing aspect of Filament’s design and is tracked in their issues/discussions.
Solution: Use Header Widgets Instead
If you want your widget to appear directly below the main content and above the relationship managers, you should place it in the header widgets, not footer widgets.
Modify your ViewPublication page like so:
namespace App\Filament\Resources\Publications\Pages;
use App\Filament\Resources\Publications\Widgets\SalesOverview;
use App\Filament\Resources\Publications\PublicationResource;
use Filament\Actions\EditAction;
use Filament\Resources\Pages\ViewRecord;
class ViewPublication extends ViewRecord
{
protected static string $resource = PublicationResource::class;
// Use header widgets instead of footer widgets
protected function getHeaderWidgets(): array
{
return [
SalesOverview::class,
];
}
protected function getHeaderActions(): array
{
return [
EditAction::make()
->slideOver(),
];
}
}
Remove your getFooterWidgets() method entirely.
Summary:
Add your widget togetHeaderWidgets()instead ofgetFooterWidgets()on your View page.
This places the widget after the main content and before relationships, which matches your goal.
References:
Let me know if you need a more advanced placement or a custom page layout!