Add current_endpoint variable to menu, navbar, settings_plugins, and settings_tabs templates back with the fixed logic

This commit is contained in:
Théophile Diot 2024-01-31 15:22:46 +01:00
parent 7d7fab9af9
commit f010ac6e44
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06
4 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,5 @@
{% set current_endpoint = current_endpoint or url_for(request.endpoint)[1:].split("/")[-1].strip()
%}
<!-- float button-->
<button
aria-controls="sidebar-menu"

View file

@ -1,3 +1,5 @@
{% set current_endpoint = current_endpoint or url_for(request.endpoint)[1:].split("/")[-1].strip()
%}
<div class="navigation-wrap bg-custom start-header start-style">
<div class="container">
<div class="row">

View file

@ -1,3 +1,5 @@
{% set current_endpoint = current_endpoint or url_for(request.endpoint)[1:].split("/")[-1].strip().replace('_', '-')
%}
{% set global_config = config["CONFIG"].get_config() %}
{% set plugins = config["CONFIG"].get_plugins() %}
<!-- plugin item -->

View file

@ -1,3 +1,5 @@
{% set current_endpoint = current_endpoint or url_for(request.endpoint)[1:].split("/")[-1].strip().replace('_', '-')
%}
{% set plugins = config["CONFIG"].get_plugins() %}
<div data-{{current_endpoint}}-tabs class="col-span-12 grid grid-cols-12 {% if current_endpoint == 'services' %}mb-4{% endif %}">
<!-- desktop tabs -->