diff --git a/templates/settings/base.html.twig b/templates/settings/base.html.twig
index c8fb51c878..0b2dc8af0d 100644
--- a/templates/settings/base.html.twig
+++ b/templates/settings/base.html.twig
@@ -1,5 +1,7 @@
{% extends '/stdgrid.html.twig' %}
+{% import 'settings/macros.html.twig' as macros %}
+
{% block title %}{{ 'Settings' | trans }}{% endblock %}
{% block stylesheets %}
@@ -8,54 +10,6 @@
{% endblock stylesheets %}
-{% macro settings_details_element(title, summary, id, details_content, context, details_ids) %}
- {% if details_ids is null %}
- {% set details_ids = [id] %}
- {% endif %}
-
-
-
- {{ title | trans }}
- {{ icon('arrow-down', 'icon icon-details-open') | raw }}
-
-
- {{ summary | trans }}
-
-
-
- {% if details_content is instanceof('Twig\\Markup') %}
- {{ details_content }}
- {% else %}
- {{ form(details_content) }}
- {% endif %}
-
-{% endmacro settings_details_element %}
-
-{% macro settings_details_container(title, summary, container_id, tabs, context) %}
- {% set children_ids = [container_id] %}
- {% set details_content %}
-
- {% endset %}
- {{ _self.settings_details_element(title, summary, container_id, details_content, context, children_ids) }}
-{% endmacro settings_details_container %}
-
{% block body %}
diff --git a/templates/settings/macros.html.twig b/templates/settings/macros.html.twig
new file mode 100644
index 0000000000..de0fd56f4d
--- /dev/null
+++ b/templates/settings/macros.html.twig
@@ -0,0 +1,47 @@
+{% macro settings_details_element(title, summary, id, details_content, context, details_ids) %}
+ {% if details_ids is null %}
+ {% set details_ids = [id] %}
+ {% endif %}
+
+
+
+ {{ title | trans }}
+ {{ icon('arrow-down', 'icon icon-details-open') | raw }}
+
+
+ {{ summary | trans }}
+
+
+
+ {% if details_content is instanceof('Twig\\Markup') %}
+ {{ details_content }}
+ {% else %}
+ {{ form(details_content) }}
+ {% endif %}
+
+{% endmacro settings_details_element %}
+
+{% macro settings_details_container(title, summary, container_id, tabs, context) %}
+ {% set children_ids = [container_id] %}
+ {% set details_content %}
+
+ {% endset %}
+ {{ _self.settings_details_element(title, summary, container_id, details_content, context, children_ids) }}
+{% endmacro settings_details_container %}