Yelp

(The Help System)

html.sidebar

Parameters

$node

The node a sidebar is being created for.

This templates outputs left and right sidebars according to the components listed in html.sidebar.left and html.sidebar.right. It only outputs each sidebar if the corresponding parameters is not empty or the string none.

This template is called inside the main element, before the div.page element, and before html.sidebar.custom. Note that even the right sidebar is placed before the div.page element. It is placed on the right using flexbox item reordering.

To actually output the sidebar components, this template splits each parameter on whitespace using the EXSLT str:split function. It then applies the mode html.sidebar.mode to each token, passing $node and the sidebar side as parameters. Extension stylesheets can add their own sidebar components by implementing that mode and matching a pattern like

token[. = 'name-of-token']

You will then be able to use name-of-token in html.sidebar.left or html.sidebar.right.

This stylesheet recognizes four tokens: contents and sections, and the special tokens none and blank.

  • The contents token provides a table of contents for the entire document. It is handled by the html.sidebar.contents template, which uses the html.sidebar.contents.mode mode to allow different input formats to implement it.

  • The sections token lists sections on the current page. It is handled by the html.sidebar.section} template, which uses the html.sidebar.sections.mode mode to allow different input formats to implement it.

  • Use the none token on its own, instead of the empty string, to completely turn off either sidebar.

  • Use the blank token to output a sidebar without adding any components to it. This is useful, for example, to keep consistent margins. If an empty sidebar is output from the blank token, it will also have the CSS class sidebar-blank so you can style it differently.