diff zpt/common_template.zpt @ 526:3f375a048402

moved search and dict into separate layers. removed search_template. added tocMode=concordance. fixed bug with paging tocs.
author casties
date Tue, 10 Apr 2012 19:41:44 +0200
parents 551ca1641a5e
children 652cc8d3f1a9
line wrap: on
line diff
--- a/zpt/common_template.zpt	Thu Apr 05 19:29:50 2012 +0200
+++ b/zpt/common_template.zpt	Tue Apr 10 19:41:44 2012 +0200
@@ -66,5 +66,31 @@
     </form>
   </metal:block>
 
+  <!-- toc type switcher -->
+  <metal:block metal:define-macro="toc_switcher">
+    <ul class="switcher">
+      <li tal:attributes="class python:test(tocMode=='thumbs', 'sel', None)"><a
+        tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a>
+      </li>
+      <li tal:attributes="class python:test(tocMode=='text', 'sel', None)"
+        tal:condition="python:docpath and docinfo.get('numTocEntries', None)">
+        <a tal:attributes="href python:here.getLink('tocMode','text')">Content</a>
+      </li>
+      <li tal:attributes="class python:test(tocMode=='figures', 'sel', None)"
+        tal:condition="python:docpath and docinfo.get('numFigureEntries', None)">
+        <a
+        tal:attributes="href python:here.getLink('tocMode','figures')">Figures</a>
+      </li>
+      <li tal:attributes="class python:test(tocMode=='concordance', 'sel', None)"
+        tal:condition="python:docpath and docinfo.get('pageNumbers', None)">
+        <a
+        tal:attributes="href python:here.getLink('tocMode','concordance')">Concordance</a>
+      </li>
+      <li tal:attributes="class python:test(tocMode=='none', 'sel', None)"><a
+        tal:attributes="href python:here.getLink('tocMode','none')">None</a>
+      </li>
+    </ul>
+  </metal:block>
+
 </body>
 </html>