Page widget showing on dashboard
Had a quick one. I created a page using and created a widget. I added the widget to the of the page .However the widget is also showing on the dashboard .
24 Replies
that is expected as it renders all widgets on the homepage (dashboard)
You can configure the widgets to display the widgets you want with your panel provider and:
->widgets([
//widgetclas
])
think in v3 you can change it in your panelprovider
you beat me haha 😉
That's what she said
Tried it out by listing the widgets excluding the one i don't want on the dashboard but still the other widget appears .
Ugh, if you do:
->widgets([ ])
do they still render?
Yes .
Something isn't right
the other widget is probably being autodiscovered
Makes sense ..Actually i have this line in the provider .
That'll do it, comment it out
Should i do away with this setting?
I believe so, then the widgets defined will be rendered instead.
Atleast there is progress .The widget no longer shows on the dashboard .However , checking it out on the intended page throws .
Happened to me same problem
https://discord.com/channels/883083792112300104/1160981510850093096
Check my post
I'm interested if you find a solution
I got a work around it but not good
i need multiple dashboards
i found a another way and its working fine now
i created custom page for the DocumentRecordResource
and a widgets for that custom page as below
and i added a navigation to that custom page in the AdminServiceProvider like this
hope this help someone
but the other way i think it has a bug
I resolved it by overriding the function on the dashboard page .
Running into the same problem, seems to be a bug, or at the very least undocument behavior
Workaround is to do something like this in the Widget:
Another (related) approach:
I have a situation where I have multiple dashboards on one Panel.
So, I grouped my widgets in subdirectories and let the Panel autodiscover them (it traverses the subdirs).
Then in each dashboard I declared
getWidgets()
like this:
(in my case \Tech\
was the namespace/subdir for one of the dashboards' widgets)That's one way of doing it, you could also put them in the canView and if the user has the tenant. I suspect your approach will be less resource intensive 🙂
i tried all those ways , but still the widget is appearing in the dashboard , so what is correct solution for this error?
Please open a new post.
ok