Issues

Issue #126 resolved

Add docname to global template vars

Anonymous created an issue

Hi,

I'd like to access the current document name in templates. You can use this to render optional content for certain documents. The following patch adds the document name to the default context variables: {{{ --- /usr/lib/python2.5/site-packages/sphinx/builder.py.orig 2009-03-11 22:59:14.000000000 +0100 +++ /usr/lib/python2.5/site-packages/sphinx/builder.py 2009-03-11 22:59:28.000000000 +0100 @@ -499,6 +499,7 @@ meta = self.env.metadata.get(docname)

     return dict(
  • docname = docname, parents = parents, prev = prev, next = next,

}}}

Comments (3)

  1. Log in to comment