58 Replies
$navigationParentItems
Hello, I manage to add a custom page to the sub navigation by adding $navigationParentItems to the class of my Custom page.
On the other hand, when I go to the view of this Custom page, the sub navigation does not appear.
I hope to have been clear. Do you know how to customize the view for this?
I'm confused as well. The sub navigation is not showing, and the docs are quite short for that topic...
Currently the sub navigation is displayed if custom pages extends "ManageRelatedRecords" but not for "Page"
Im a little confused too, i added the following to my resource (basically copied the demo) but no nav is appearing.
yes, same for me and "ManageRelatedRecords" doesn't make sense for me, as I want to add custom pages as well.
Im not really using custom pages, just the normal view, edit and the new
ManageRelatedRecords
can anyone from the core team give us a hint?
@Prodex Does this appear for you on pages that have "ManageRelatedRecords"?
Maybe we need to enable it first?
the docs don't say anything about that
@Dan Harrin Can you shed some light? There are multiple confused people here π
sub navigation is not parent items
someone tell me what youre trying to do
Added this to my
ProfileResource
added a new ManageProfileAddresses
page.add sub navigation to Custom Page
not specific enough
please explain what youre actually trying to achieve
My issue: Display the sub navigation
the demo even has an example in the post resource
I copied this, seems like im missing something still. π€
so what is happening
Should I do something else? Configure the view?
Nothing π
have you defined getRecordSubNavigation() in the resource
I think we are talking about 2 different issues here tbh.
definitely.
Yes.
yes :
show the code for these pages
I will let him go first, it will probably solve my issue too.
One he posted above
Like Flo said, I also copied the example from the docs and implemented my pages. But the sub nav doesn't show up, and we're trying to figure out why.
Is there anything, that needs to be done for the sub navigation to show up?
(it's in the resource class btw, just like the docs said)
Wait is it a resource or a custom page you put this on? Dan, do we support custom pages with subnavigation?
all pages support sub navigation
(For me, it appears well on classic "view, edit..." pages but not on custom pages, and I think it's because of my view. But what to add there?)
do any of you have custom themes
maybe they need recompiling
omg..
Thats it..
That solves my problem atleast....
please recompile themes after every update
Best to add this to composer scripts, too.
Gonna do that right now π
For me, it still doesn't work.
Should I add something here?
log-server.blade.php
What exactly did you do? I use "npm run dev" in the background.
I ran
npm run build
Refreshed the page and just like magic, it appeared!Yeah, probably something different here, as it works on the Resource.
Yes, anything that extends from "ManageRelatedRecords", "EditRecord", "ListRecords", "ViewRecord" works, but not if it extends from "Page"
but why ?
on the custom page
ListRecords doesnt do it, its just βrecordβ pages
just like default custom pages dont have a $record, they dont have record sub navigation either
so you just have to point it towards the resource yourself
yeah! That's it for me.
Maybe this needs to be in the docs as well in the page section? I can add that later if you want.
realised that using records on custom pages was severely underdocumented
and also improved the experience of using InteractsWithRecord to handle the subnav
you shouldnt need to define getSubNavigation() etc when this is released
Damn, that was fast π
just released v3.1.2 unofficially for this, since it should be a big improvement
will be on packagist in 2 mins
Nice!! Thank you so much Dan for your great effort all the time β€οΈ
Thank you Dan !
I'm using filament 3.1.8, and i have implemented everything written on the docs but not working.
Could someone please help me
Thanks
protected static ?string $navigationParentItem = 'Hearing settings';
return
Call to a member function keyBy() on null
Please any one got the same issue
Probably need to upgrade your Filament version.
I ran into this. You may have permission mismatch here where the user can't access the parent item - but does have access to the child.
Hi I tried this on a custom page - with and without commented code? https://gist.github.com/craigvc/f550679a599fd4dbb2721f24a50fbd7f
I just want the navigation items to show up under settings - is this possible>?
clusters are superior to nav parent items, try those
Hi yes ended up using them thanks!!!!