Dashboard Presets¶
It is possible to configure presets of dashboards.
The extension already ships a default
as well as an empty
dashboard preset.
Create preset¶
New presets can be configured:
<?php
return [
'default' => [
'title' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:dashboard.default',
'description' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:dashboard.default.description',
'iconIdentifier' => 'content-dashboard',
'defaultWidgets' => ['t3information', 't3news', 'docGettingStarted'],
'showInWizard' => false,
],
];
The file has to return an array with all presets. Each prefix itself is an array, with an identifier as key. The identifier is used to configure presets for users, see Configure preset for user.
Each preset consists of the following options:
- class DashboardPreset ¶
-
- Fully qualified name
-
\TYPO3\
CMS\ Dashboard\ Dashboard Preset
-
title
¶ -
- Type
- string
The title used for the preset. E.g. a
LLL:EXT:
reference..
-
description
¶ -
- Type
- string
The description used for the preset. E.g. a
LLL:EXT:
reference..
-
icon
¶Identifier -
- Type
- string
The identifier of the icon to use.
-
default
¶Widgets -
- Type
- array
An array of widget identifiers, that should be part of the dashboard preset.
Widgets are always filtered by permissions of each user. Only widgets with access are actually part of the dashboard. Have a look at Permissions of widgets to understand how to handle permissions.
-
show
¶In Wizard -
- Type
- bool
Boolean value to indicate, whether this preset should be visible in the wizard, when creating new dashboards, see Adding Dashboard.
This can be disabled, to add presets via Configure preset for user, without showing up in the wizard.
Configure preset for user¶
To define the default preset for a backend user, the following User TSconfig can be added:
options.dashboard.dashboardPresetsForNewUsers = default
Where default
is the identifier of the preset.
Even a comma separated list of identifiers is possible:
options.dashboard.dashboardPresetsForNewUsers = default, companyDefault
It is also possible to add another dashboard to the set of dashboards:
options.dashboard.dashboardPresetsForNewUsers := addToList(anotherOne)
If nothing is configured, default
will be used as identifier.
See also
Importing the user TSconfig into a backend user or group section of TSconfig manual explains how to set or register TSconfig for user.
Value modifications with ":=" explains the usage of
:=
TypoScript operator.