Chris@0: {# Chris@0: /** Chris@0: * @file Chris@0: * Theme override for a section of the help page. Chris@0: * Chris@0: * This implementation divides the links into 4 columns. Chris@0: * Chris@0: * Available variables: Chris@0: * - title: The section title. Chris@0: * - description: The description text for the section. Chris@0: * - links: Links to display in the section. Chris@0: * - empty: Text to display if there are no links. Chris@0: */ Chris@0: #} Chris@0:
{{ description }}
Chris@0: {% if links %} Chris@0: {# Calculate the column length, to divide links into 4 columns. #} Chris@0: {% set size = links|length // 4 %} Chris@0: {% if size * 4 < links|length %} Chris@0: {% set size = size + 1 %} Chris@0: {% endif %} Chris@0: Chris@0: {# Output the links in 4 columns. #} Chris@0: {% set count = 0 %} Chris@0: {% for link in links %} Chris@0: {% if count == 0 %} Chris@0: {# Start a new column. #} Chris@0:{{ empty }}
Chris@0: {% endif %} Chris@0: