Skip to content

Commit

Permalink
Fixing Custom Extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitrySikorsky committed Jan 13, 2023
1 parent 1d919be commit 849b229
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_extensions/backend_dashboard_widgets.rst
Expand Up @@ -7,7 +7,7 @@ Most of the apps have some key metrics, analytics, or statistics that should be
It could be number of the registered users or orders for the last week, sales amount etc.

The home page of the Platformus CMS backend (admin panel) is a dashboard where you can add your own widgets.
Each widget is regular `view component <https://learn.microsoft.com/en-us/aspnet/core/mvc/views/view-components>`_,
Each widget is a regular `view component <https://learn.microsoft.com/en-us/aspnet/core/mvc/views/view-components>`_,
so it has its own view and can look and behave in any way.

To add your view component(s) to the dashboard you need to implement the
Expand All @@ -30,11 +30,11 @@ class to be able to override only the methods you want:
}
This file can be placed anywhere in the project, it will be resolved automatically by the
`default implementation <https://github.com/Platformus/Platformus/blob/master/src/Platformus.Core.Backend/Metadata/Providers/DefaultMenuGroupsProvider.cs#L18>`_ of the
`IMenuGroupsProvider <https://github.com/Platformus/Platformus/blob/master/src/Platformus.Core.Backend/Metadata/Providers/IMenuGroupsProvider.cs#L9>`_ interface.
`default implementation <https://github.com/Platformus/Platformus/blob/master/src/Platformus.Core.Backend/Metadata/Providers/DefaultDashboardWidgetsProvider.cs#L11>`_ of the
`IDashboardWidgetsProvider <https://github.com/Platformus/Platformus/blob/master/src/Platformus.Core.Backend/Metadata/Providers/IDashboardWidgetsProvider.cs#L9>`_ interface.

Let’s look at the `DashboardWidget <https://github.com/Platformus/Platformus/blob/master/src/Platformus.Core.Backend/Metadata/DashboardWidget.cs#L6>`_ class’s properties.

``Name`` is the view component name.
``ViewComponentName`` is the view component name.

``Position`` is used to sort the widgets. Widgets with a lower position are placed higher.

0 comments on commit 849b229

Please sign in to comment.