Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CoreHome/templates/_topBar.twig')
-rw-r--r--plugins/CoreHome/templates/_topBar.twig11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/CoreHome/templates/_topBar.twig b/plugins/CoreHome/templates/_topBar.twig
index f722e74ffc..c53ce95577 100644
--- a/plugins/CoreHome/templates/_topBar.twig
+++ b/plugins/CoreHome/templates/_topBar.twig
@@ -13,12 +13,17 @@
{{ menu._html|raw }}
{% else %}
<a {% if menu._tooltip is defined %}title="{{ menu._tooltip }}"{% endif %}
- id="topmenu-{{ menu._url.module|lower }}" target="_self"
- href="index.php{{ menu._url|urlRewriteWithParameters }}" tabindex="3">{{ _self.menuItemLabel(label, icon) }}</a>
+ {% if menu._url.module is defined %}
+ id="topmenu-{{ menu._url.module|lower }}"
+ href="index.php{{ menu._url|urlRewriteWithParameters }}"
+ {% else %}
+ href="{{ menu._url }}" rel="noreferrer noopener"
+ {% endif %}
+ target="_self" tabindex="3">{{ _self.menuItemLabel(label, icon) }}</a>
{% endif %}
{% endmacro %}
- {% macro isActiveItem(menu, currentModule, currentAction) %}{% if (menu and menu._url and menu._url.module == currentModule and (menu._url.action is empty or menu._url.action == currentAction)) %}active{% endif %}{% endmacro %}
+ {% macro isActiveItem(menu, currentModule, currentAction) %}{% if (menu and menu._url and menu._url.module is defined and menu._url.module == currentModule and (menu._url.action is empty or menu._url.action == currentAction)) %}active{% endif %}{% endmacro %}
{% if topMenuModule is not defined %}
{% set topMenuModule = currentModule %}