Dashboard custom view

I saw this was previously discussed. But I want to remove the default Map that is on the dashboard in favour of my own dashboard that I have created with the Dashboard module. Can anyone guide me on how to do this? If I can’t remove the native dashboard that shows the map. Can I at least disable this and enable my own dashboard as the main one?

1 Like

Welcome to the forum @888m! :slight_smile:

What “Dashboard” module are you referring to? Is it a separate Drupal module that you’ve added to your instance? (for example this one: https://www.drupal.org/project/dashboards) Understanding what you’re using will help provide the best recommendation.

Generally speaking, there are a few different options for customizing the farmOS dashboard. The farmOS dashboard is basically just a controller with a route/path of /dashboard. This is provided by the “farmOS Dashboard” module (farm_ui_dashboard). That module provides the route, and also makes it the default front page of the Drupal site when it is installed (see: farmOS/modules/core/ui/dashboard/farm_ui_dashboard.install at 09e94797270f7f9ae1d50be9b920736580a721c6 · farmOS/farmOS · GitHub).

So with that in mind, one very simple way to customize your instance is to create a separate page/route, and just change the page.front configuration for your instance to point to that instead. This gives you full control and you can build whatever you like. You just need a route that you can point to. You don’t even need to touch or uninstall the farm_ui_dashboard module. It will still live at /dashboard, but your own route (eg: /my-dashboard) can be set as the default front page.

Another option is to keep the existing farmOS dashboard route as the default front page, but customize it via a custom module. The farm_ui_dashboard module provides hooks for adding/altering dashboard blocks. If you are familiar with Drupal module development, here is the example code included in the module: farmOS/modules/core/ui/dashboard/farm_ui_dashboard.api.php at 3.x · farmOS/farmOS · GitHub

Hope that helps!

1 Like

Thanks, @mstenta , I used the redirect option, and now my custom dashboard is on the homepage!

2 Likes