From deb1cb5d24c3d483d27c7bab8abb0383c25d5323 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Thu, 12 Apr 2018 16:28:54 +0100 Subject: [Wiki] Some excellent shitcode for document TOCs --- templates/wiki/base.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'templates/wiki/base.html') diff --git a/templates/wiki/base.html b/templates/wiki/base.html index e400be02..60f031b9 100644 --- a/templates/wiki/base.html +++ b/templates/wiki/base.html @@ -33,6 +33,26 @@
    + {% if data is defined %} + {% if "headers" in data %} +
  • Contents
  • + {% for header in data.headers %} + {% if "sub_headers" in header %} +
  • + {{ header.title }} + +
  • + {% else %} +
  • {{ header.title }}
  • + {% endif %} + {% endfor %} + {% endif %} +
  • + {% endif %}
  •  Home
  • -- cgit v1.2.3