Chris@0: {# Chris@0: /** Chris@0: * @file Chris@0: * Default theme implementation for a set of links. Chris@0: * Chris@0: * Available variables: Chris@0: * - attributes: Attributes for the UL containing the list of links. Chris@0: * - links: Links to be output. Chris@0: * Each link will have the following elements: Chris@0: * - title: The link text. Chris@0: * - url: The link URL. If omitted, the 'title' is shown as a plain text Chris@0: * item in the links list. If 'url' is supplied, the entire link is passed Chris@0: * to l() as its $options parameter. Chris@0: * - attributes: (optional) HTML attributes for the anchor, or for the Chris@0: * tag if no 'url' is supplied. Chris@0: * - heading: (optional) A heading to precede the links. Chris@0: * - text: The heading text. Chris@0: * - level: The heading level (e.g. 'h2', 'h3'). Chris@0: * - attributes: (optional) A keyed list of attributes for the heading. Chris@0: * If the heading is a string, it will be used as the text of the heading and Chris@0: * the level will default to 'h2'. Chris@0: * Chris@0: * Headings should be used on navigation menus and any list of links that Chris@0: * consistently appears on multiple pages. To make the heading invisible use Chris@0: * the 'visually-hidden' CSS class. Do not use 'display:none', which Chris@0: * removes it from screen readers and assistive technology. Headings allow Chris@0: * screen reader and keyboard only users to navigate to or skip the links. Chris@0: * See http://juicystudio.com/article/screen-readers-display-none.php and Chris@0: * http://www.w3.org/TR/WCAG-TECHS/H42.html for more information. Chris@0: * Chris@0: * @see template_preprocess_links() Chris@0: * Chris@0: * @ingroup themeable Chris@0: */ Chris@0: #} Chris@0: {% if links -%} Chris@0: {%- if heading -%} Chris@0: {%- if heading.level -%} Chris@0: <{{ heading.level }}{{ heading.attributes }}>{{ heading.text }} Chris@0: {%- else -%} Chris@0: {{ heading.text }} Chris@0: {%- endif -%} Chris@0: {%- endif -%} Chris@0: Chris@0: {%- for item in links -%} Chris@0: Chris@0: {%- if item.link -%} Chris@0: {{ item.link }} Chris@0: {%- elseif item.text_attributes -%} Chris@0: {{ item.text }} Chris@0: {%- else -%} Chris@0: {{ item.text }} Chris@0: {%- endif -%} Chris@0: Chris@0: {%- endfor -%} Chris@0: Chris@0: {%- endif %}