View

View lets you set properties that will be passed on to a Twig template.
View will also set several properties that will be available in all Twig
templates, including:

currentModule: The value of the module query parameter.

currentAction: The value of the action query parameter.

userLogin: The current user login name.

sites: List of site data for every site the current user has at least
view access for.

url: The current URL (sanitized).

token_auth: The current user's token auth.

userHasSomeAdminAccess: True if the user has admin access to at least
one site, false if otherwise.

userIsSuperUser: True if the user is the superuser, false if otherwise.

latest_version_available: The latest version of Matomo (formerly Piwik) available.

isWidget: The value of the 'widget' query parameter.

show_autocompleter: Whether the site selector should be shown or not.

loginModule: The name of the currently used authentication module.

userAlias: The alias of the current user.

isInternetEnabled: Whether the matomo server is allowed to connect to
external networks.

Template Naming Convention

Template files should be named after the controller method they are used in.
If they are used in more than one controller method or are included by another
template, they should describe the output they generate and be prefixed with
an underscore, eg, _dataTable.twig.

Twig

Twig templates must exist in the templates folder in a plugin's root
folder.

The following filters are available to twig templates:

translate: Outputs internationalized text using a translation token, eg,
{{ 'General_Date'|translate }}. sprintf parameters can be passed
to the filter.

urlRewriteWithParameters: Modifies the current query string with the given
set of parameters, eg,