Hi

I would like to add some contents to the sidebar and I did not succeed. I 
create the following layout.html file in the _template directory :

{% extends "!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 %}

{%- block sidebar2 %}{{ sidebar() }}{% endblock %}

{%- block footer %}
    <div class="footer">
    Site hébergé par l'<a href="http://www.univ-pau.fr/";>Université de Pau 
et des Pays de l'Adour</a><br/>
    {%- if show_copyright %}
      {%- if hasdoc('copyright') %}
        {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; 
<a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
      {%- else %}
        {% trans copyright=copyright|e %}&copy; Copyright {{ copyright 
}}.{% endtrans %}
      {%- endif %}
    {%- endif %}
    {%- if last_updated %}
      {% trans last_updated=last_updated|e %}Last updated on {{ 
last_updated }}.{% endtrans %}
    {%- endif %}
    {%- if show_sphinx %}
      {% trans sphinx_version=sphinx_version|e %}Created using <a 
href="http://sphinx.pocoo.org/";>Sphinx</a> {{ sphinx_version }}.{% endtrans 
%}
    {%- endif %}
    </div>
{%- endblock %}

Whatever I tried to modified in the sidebar macro the modifications never 
appears after an html build. On the contrary modifications I did in the 
footer bloc appears.

If I rename the sidebar macro and I change the name in the block sidebar2 
the sidebar disappear. I think sphinx do not find the sidebar macro in my 
layout.html file. That is why I add the block sidebar2 into my layout.html 
file. I tried to add {{ super() }} at the end of my layout.html file but it 
does not fix my problem.

How can I do ?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sphinx-dev/-/WrOBwoVctzMJ.
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