Oops I omitted a line from the example of how  to print a link to a
page's parent.  The actual code is:

{# Filename #}
{% set parents = parents.pop() %}
{% if parents %}
<a href="{{ parents.link|e }}">{{ parents.title }}</a>
{% endif %}

It probably doesn't matter much for the solution, but I wanted to
comment for the sake of correctness.
-hanna

On Wed, Dec 1, 2010 at 2:22 AM, hanna <hmend...@mit.edu> wrote:
> Hi!
>
> I'm trying to write a sidebar template that will display the the toc
> of the current page's parent (in the sidebar for the pages
> html_sidebars says it should).  I've know that you can display a
> global toc with:
>
> {# Filename #}
> {{ toctree() }}
>
> a local toc with:
>
> {# Filename #}
> {{ toc }}
>
> and a link to the parent page with:
>
> {# Filename #}
> {% if parents %}
> <a href="{{ parents.link|e }}">{{ parents.title }}</a>
> {% endif %}
>
>
> But I want something that prints the parent page's local toc.  Is a
> function that's basically "(local) toc for the specified file"?  An
> alternate solution?
>
> Thanks so much.
>
> -hanna
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to