aboutsummaryrefslogtreecommitdiff
path: root/epub/templates/toc.ncx
diff options
context:
space:
mode:
Diffstat (limited to 'epub/templates/toc.ncx')
-rw-r--r--epub/templates/toc.ncx28
1 files changed, 28 insertions, 0 deletions
diff --git a/epub/templates/toc.ncx b/epub/templates/toc.ncx
new file mode 100644
index 00000000..e7dd391a
--- /dev/null
+++ b/epub/templates/toc.ncx
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/"
+ xmlns:py="http://genshi.edgewall.org/"
+ version="2005-1">
+ <head>
+ <meta name="dtb:uid" content="urn:uuid:${book.UUID}"/>
+ <meta name="dtb:depth" content="${book.getTocMapHeight()}"/>
+ <meta name="dtb:totalPageCount" content="0"/>
+ <meta name="dtb:maxPageNumber" content="0"/>
+ </head>
+ <docTitle>
+ <text>${book.title}</text>
+ </docTitle>
+ <navMap>
+ <py:def function="navPoint(node)">
+ <navPoint id="navPoint-${node.playOrder}" playOrder="${node.playOrder}">
+ <navLabel><text>${node.title}</text></navLabel>
+ <content src="${node.href}"/>
+ <py:for each="child in node.children">
+ ${navPoint(child)}
+ </py:for>
+ </navPoint>
+ </py:def>
+ <py:for each="child in book.getTocMapRoot().children">
+ ${navPoint(child)}
+ </py:for>
+ </navMap>
+</ncx>
bgstack15