diff options
Diffstat (limited to '')
-rw-r--r-- | templates/page.mako | 10 | ||||
-rw-r--r-- | templates/pages/translating.mako | 2 |
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> |