I have two tocs in my index.rst, each contained by an ifconfig
statement.

 

The body of the index.rst generates correctly, with the correct toc
showing according to the parameters for ifconfig.

 

However, the sidebar (which contains a mini-toc based on index.rst) does
not generate correctly. It contains both of the tocs.

 

This seems to be a bug due to the way the parsing is being done.

 

I am using the old-style sidebar structure in my layout.html

 

{%- macro sidebar() %}

      {%- if render_sidebar %}

      <div class="sphinxsidebar">

        <div class="sphinxsidebarwrapper">

          {%- block sidebarlogo %}

         {%- if logo %}

            <p class="logo"><a href="{{ pathto(master_doc) }}">

              <img class="logo" src="{{ pathto('_static/' + logo, 1) }}"
alt="Logo"/>

            </a></p>

          {%- endif %}

          {%- endblock %}

          {%- if sidebars != None %}

            {#- new style sidebar: explicitly include/exclude templates
#}

            {%- for sidebartemplate in sidebars %}

            {%- include sidebartemplate %}

            {%- endfor %}

          {%- else %}

            {#- old style sidebars: using blocks -- should be deprecated
#}

            {%- block sidebartoc %}

            {%- include "localtoc.html" %}

            {%- endblock %}

            {%- block sidebarrel %}

            {%- include "relations.html" %}

            {%- endblock %}

            {%- block sidebarsourcelink %}

            {#%- include "sourcelink.html" %#}

            {%- endblock %}

            {%- if customsidebar %}

            {%- include customsidebar %}

            {%- endif %}

            {%- block sidebarsearch %}

            {%- include "searchbox.html" %}

            {%- endblock %}

          {%- endif %}

        </div>

      </div>

      {%- endif %}

{%- endmacro %}

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@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