How to load widgets only on specific pages/dashboards?
Hey all,
I am trying to achieve multiple dashboards with different widgets.
But somehow All widgets are loaded on all dashboards. Using getHeaderWidgets is just adding the widget of the array 2nd time on the page.
This is loading all widgets an all pages.
If I remove it and add widgets here:
All of these widgets are loaded on every dashboard page.
I am confused
Thx for help
I am trying to achieve multiple dashboards with different widgets.
But somehow All widgets are loaded on all dashboards. Using getHeaderWidgets is just adding the widget of the array 2nd time on the page.
This is loading all widgets an all pages.
If I remove it and add widgets here:
All of these widgets are loaded on every dashboard page.
I am confused
Thx for help
Solution
Check the source code of the
Dashboard class. It has a getWidgets() class that you can overwrite with the wanted widgets.