diff options
| author | Georg Brandl <georg@python.org> | 2009-09-09 15:56:52 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2009-09-09 15:56:52 +0200 |
| commit | aa293c6089b8af346697b043db10a16214e575b5 (patch) | |
| tree | b975ebf11cd061efa9078609590d4d00b7f350c1 /doc/templating.rst | |
| parent | a4b07b548d88eee3af0cf62d8ee48a9239890d4b (diff) | |
| download | sphinx-aa293c6089b8af346697b043db10a16214e575b5.tar.gz | |
The ``toctree()`` callable in templates now has a ``maxdepth``
keyword argument to control the depth of the generated tree.
Also add tests for that callable.
Diffstat (limited to 'doc/templating.rst')
| -rw-r--r-- | doc/templating.rst | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/templating.rst b/doc/templating.rst index 61657547..80c290ca 100644 --- a/doc/templating.rst +++ b/doc/templating.rst @@ -364,5 +364,10 @@ are in HTML form), these variables are also available: .. data:: toctree A callable yielding the global TOC tree containing the current page, rendered - as HTML bullet lists. If the optional keyword argument ``collapse`` is true, - all TOC entries that are not ancestors of the current page are collapsed. + as HTML bullet lists. Optional keyword arguments: + + * ``collapse`` (true by default): if true, all TOC entries that are not + ancestors of the current page are collapsed + + * ``maxdepth`` (defaults to the max depth selected in the toctree directive): + the maximum depth of the tree; set it to ``-1`` to allow unlimited depth |
