Dynamic Badge Count on Sub Navigation Relation Page

Hi all I am not finding a method that I can use which I can access the the relationship modal on a relationship manager PAGE. I can edit the label of the sub navigation but I cannot seem to access the records to get a count. I simply would like a badge count on the sub nav. Can anyone assist here at all? Many thanks.
6 Replies
David | Fortune Validator
A gentle bump to see if anyone has any ideas. I get errors that I cannot use record object. And static getOwner doesn’t work either. Anyone any ideas ?
David | Fortune Validator
Thanks for replying. Sorry unless I’m missing it though, I’m not using a Cluster in my example.
luciano.mizra
luciano.mizra4mo ago
Clusters is the official recommended option, if you want to see other options watch this video: https://youtu.be/cpbWn42Is6A?si=el-43knIaDzVAwYF
Filament Daily
YouTube
Filament: Third-Level Menu in Three Different Ways
Let's run through various options to build multi-level navigation in Filament. Links mentioned in the video: - Official Filament demo: https://github.com/filamentphp/demo - Filament v3.1: Parent Navigation and Sub-Navigation: https://filamentphp.com/community/alexandersix-filament-v3-1 - Clusters: https://filamentphp.com/docs/3.x/panels/cluster...
David | Fortune Validator
I thought clusters was just a way to link similar resources. I am currently using relationship pages ( sub pages of the main resource sharing the OwnerRecord) so I can access relationship data. Eg upload files page linked to a JobResoirce
ikbentomas
ikbentomas2w ago
I think i had the same issue and i've just found a solution.
public static function getNavigationBadge(): ?string
{
$record = request('record');
return $record->attribute;
}

public static function getNavigationBadge(): ?string
{
$record = request('record');
return $record->attribute;
}

This number does show up in my sub navigation 🙂
Want results from more Discord servers?
Add your server