[%-# '<=prev | up | next=>' chapters navigation bar
# if there is no up, prev or next we render only a transparent placeholder
# expects to be set
# nav - cache navigator object
# rel_doc_root - relative docs path
-%]
[%- prev = nav.prev;
next = nav.next;
IF prev;
prev_link = INCLUDE link prefix=rel_doc_root link=prev.meta.link;
END;
IF next;
next_link = INCLUDE link prefix=rel_doc_root link=next.meta.link;
END;
-%]
[%- # don't add the navigation for the top level index.html
IF prev_link || next_link || doc.meta.id != 'home' -%]
[%- IF prev_link -%]
[%- ELSE -%]
[%- END -%]
[%- IF rel_doc_root -%]
[%- ELSE -%]
[%- END -%]
[%- IF next_link -%]
[%- ELSE -%]
[%- END -%]
[%- ELSE -%]
[%- END -%]