summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-04-07 15:53:04 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-04-07 15:53:04 +0200
commit966d6540c7418fad5c0a201b5d57af11a4e041fb (patch)
tree3c4e581200c2d54f5f8073c6d4e30bf84d9098ca
parent9fc6d01dad491e14d35c691613eaa75aff7e902b (diff)
downloadweb-966d6540c7418fad5c0a201b5d57af11a4e041fb.tar.gz
web-966d6540c7418fad5c0a201b5d57af11a4e041fb.tar.bz2
web-966d6540c7418fad5c0a201b5d57af11a4e041fb.zip
Some more toc
-rw-r--r--templates/page.mako10
-rw-r--r--templates/pages/translating.mako2
2 files changed, 9 insertions, 3 deletions
diff --git a/templates/page.mako b/templates/page.mako
index cc3f480..9e1f20f 100644
--- a/templates/page.mako
+++ b/templates/page.mako
@@ -17,14 +17,16 @@ ${next.body()}
<%def name="style()">
${parent.style()}
- <script src=${"/static/js/toc.js" | url} type="text/javascript"></script>
+ % if self.attr.uses_toc:
+ <script src=${"/static/js/toc.js" | url} type="text/javascript"></script>
+ % endif
</%def>
<%def name="h2()">
<%
if self.attr.uses_toc:
c = capture(caller.body)
- name = c.replace(" ", "_").lower()
+ name = c.replace(" ", "_").replace("/", "_").lower()
tlist = getattr(self.attr, "tlist", [])
tlist.append((str(name), str(c)))
@@ -34,3 +36,7 @@ ${next.body()}
%>
<h2><a name="${name}"><span class="hstart">» </span></a>${caller.body()}</h2>
</%def>
+
+<%def name="toc()">
+ <div id="toc"></div>
+</%def>
diff --git a/templates/pages/translating.mako b/templates/pages/translating.mako
index 5461199..a6014d2 100644
--- a/templates/pages/translating.mako
+++ b/templates/pages/translating.mako
@@ -8,7 +8,7 @@
Portato supports native languages. Nevertheless the translations into these languages have to be created. This page shows how to add a new translation or how to extend an existing translation.
</p>
-<div id="toc"></div>
+${self.toc()}
<%self:h2>Short introduction about NLS in Linux</%self:h2>
<p>