diff --git a/templates/components/page-toc.html.twig b/templates/components/page-toc.html.twig
index 33e952c..43109fe 100755
--- a/templates/components/page-toc.html.twig
+++ b/templates/components/page-toc.html.twig
@@ -1,16 +1,4 @@
-{% macro toc_loop(items) %}
- {% for item in items %}
- {% set class = loop.first ? 'first' : loop.last ? 'last' : null %}
-
@@ -18,7 +6,7 @@
{% if table_of_contents is not empty %}
{{ 'PLUGIN_PAGE_TOC.TABLE_OF_CONTENTS'|t }}
- {{ _self.toc_loop(table_of_contents.children) }}
+ {{ toc_macros.toc_loop(table_of_contents.children) }}
{% endif %}
diff --git a/templates/macros/topmenu.html.twig b/templates/macros/macros.html.twig
similarity index 55%
rename from templates/macros/topmenu.html.twig
rename to templates/macros/macros.html.twig
index 80319b5..a86f812 100644
--- a/templates/macros/topmenu.html.twig
+++ b/templates/macros/macros.html.twig
@@ -1,5 +1,24 @@
+{# MACRO FOR PAGE-TOC PLUGIN SUPPORT #}
+
+{% macro toc_loop(items) %}
+ {% import _self as toc_macros %}
+ {% for item in items %}
+ {% set class = loop.first ? 'first' : loop.last ? 'last' : null %}
+