summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Meister <devnull@localhost>2012-12-10 21:54:11 +0100
committerRoland Meister <devnull@localhost>2012-12-10 21:54:11 +0100
commit040bb14e229fbaeeafad8231d571fac6174f7d47 (patch)
treea8e3e0420dbb6d41bb9a0a33f4f17ae85ddbca30
parentb2f50bb3a5223c8007657e1528ac3b407bf09ab0 (diff)
downloadsphinx-040bb14e229fbaeeafad8231d571fac6174f7d47.tar.gz
Bug #1047: templating toctree()'s includehidden argument
Document the includehidden option and give it sane defaults. See bug #1047 for implementation alternatives.
-rw-r--r--doc/templating.rst3
-rw-r--r--sphinx/builders/html.py2
2 files changed, 5 insertions, 0 deletions
diff --git a/doc/templating.rst b/doc/templating.rst
index 05a1346c..b9dfc683 100644
--- a/doc/templating.rst
+++ b/doc/templating.rst
@@ -391,3 +391,6 @@ are in HTML form), these variables are also available:
* ``titles_only`` (false by default): if true, put only toplevel document
titles in the tree
+
+ * ``includehidden`` (false by default): if true, the TOC tree will also
+ contain hidden entries.
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
index f5218673..7fa42057 100644
--- a/sphinx/builders/html.py
+++ b/sphinx/builders/html.py
@@ -653,6 +653,8 @@ class StandaloneHTMLBuilder(Builder):
self.indexer.feed(pagename, title, doctree)
def _get_local_toctree(self, docname, collapse=True, **kwds):
+ if 'includehidden' not in kwds:
+ kwds['includehidden'] = False
return self.render_partial(self.env.get_toctree_for(
docname, self, collapse, **kwds))['fragment']