Nesting Breadcrumbs?

I found the documentation on how to set up a Navigation group or to assign a page or resource as a child of another page or resource, but the breadcrumbs don't appear to reflect these relationships. e.g., I'm setting up a tool as a package, so i want all the menu items to show up under a single item that folds or hides (group and parent/child both seem to do this) when not in use. My tool has a color model that stores default colors used by the tool, as an example. When I select Color, it defaults to going to the list of colors. I can set a $stub value that will change the url route to be */MyTool/Colors But instead of showing MyTool > Colors > List, it only shows Colors > List on the breadcrumbs at the top. How do I get the breadcrumbs to reflect the group?
4 Replies
Lara Zeus
Lara Zeus5w ago
you can use the method getBreadcrumb in the page class to override it when needed
treii28
treii284w ago
uhhhh, ok. How? I could land an airplane by properly moving the various control mechanisms. That instruction won't get me on the ground in one piece. Examples?! Something in the documentation? (FYI: I already found a reference to getBreadcrumb but couldn't find any documentation on it. Searching the filament documentation using their website's search function only gives a references to 'getBreadcrumbs' [plural] is no public. I am considering switching to another platform because of how lacking the documentation is and how poor getting reasonably timed help is - that answer is not helping)
Lara Zeus
Lara Zeus4w ago
something like this:
public function getBreadcrumbs(): array
{
return [
...parent::getBreadcrumbs(),
'link'=>'text'
];
}
public function getBreadcrumbs(): array
{
return [
...parent::getBreadcrumbs(),
'link'=>'text'
];
}
No description
treii28
treii284w ago
ty
Want results from more Discord servers?
Add your server