[REF][WIP] doc: better navigation between pages

This commit is contained in:
Victor Feyens 2020-09-29 16:42:13 +02:00
parent 2c55f54d58
commit 3e00b2dc0a
3 changed files with 17 additions and 17 deletions

View File

@ -1,22 +1,20 @@
{# warning: if doc structure change, these rules may have to change as well #}
{# ===== VARIABLES ====== #}
{% set master_doc_short_name = 'Odoo Doc' %}
{% set master_doc_short_name = 'Documentation' %}
<!-- VFE TODO use value from config ? -->
{% if pagename == master_doc %}
<li><a href="{{ pathto(master_doc) }}" class="active">{{ master_doc_short_name }}</a></li>
{% else %}
{# Do not show main TOC link when in user/dev doc subpages to shorten breadcrumb links #}
{% if 'show_main_toc_link' in meta %}
<li><a href="{{ pathto(master_doc) }}">{{ master_doc_short_name }}</a></li>
{% endif %}
{% for parent in parents %}
{% if loop.length > 1%}
{% if loop.first %}
<li><a href="{{ pathto(master_doc) }}">{{ master_doc_short_name }}</a></li>
{% else %}
<li><a href="{{ parent.link|e }}">{{parent.title}}</a></li>
{% endif %}
{% else %}
<li><a href="{{ pathto(master_doc) }}">{{ master_doc_short_name }}</a></li>
{% endif %}
<li><a href="{{ parent.link|e }}">{{ parent.title }}</a></li>
{% endfor %}
<li class="active"><a href="#">{{ meta.get('main-title', title) }}</a></li>
{% endif %}
{% endif %}
<!-- VFE TODO integrate "next" page logic to allow better navigation -->

View File

@ -1,8 +1,9 @@
:banner: banners/index.jpg
:show_main_toc_link:
============================
Odoo Developer Documentation
============================
=======================
Developer Documentation
=======================
.. todo:: what's the documentation's license?

View File

@ -1,8 +1,9 @@
:banners-display:
:show_main_toc_link:
=======================
Odoo User Documentation
=======================
==================
User Documentation
==================
.. VFE FIXME what is the logic behind index-tree ?