{{ widgets('aside_top') }} {# This part is only shown if there are no widgets in the 'aside_top' widgets slot. #}
{# The next section attempts to fill the panel in the sidebar with the contents of the 'about-us'-block, if it exists. First, attempt to fetch the block with slug 'about-us' #} {% setcontent block = "block/about-us" %} {# check if we have a title. If so, we know we have content to display. Otherwise, we will output a default text, telling the user to create the 'blocks' in the backend. #} {% if block.title is defined %}
{{ block.title }}
{{ block.content }} {% set edit_link = block.editlink() %} {% set content_link = block.contentlink|default() %} {% if content_link or edit_link %}

{%- if content_link %} {{ __('general.phrase.read-more') }} {% endif -%} {%- if edit_link %} / {{ __('general.phrase.edit') }} {% endif -%}

{% endif %} {% else %}
{{ __('general.phrase.missing-about-page') }}

{{ __('general.phrase.missing-about-page-block') }}

{% endif %}
{# The next section iterates over all of the contenttypes, and prints a list of the five latest records of each of them. The 'magic' happens in the setcontent tag.. ct.slug ~ "/latest/3" concatenates the slug of the contenttype with /latest/3, so it becomes something like "pages/latest/3". The 'else' in the inner for-loop is only used if there are no 'records', so we can use it to print a helpful message. Lastly, "path('contentlisting', {'contenttypeslug': ct.slug})" will output something like '/pages', effectively creating a working link to that contenttpye's listing page. #} {% for ct in config.get('contenttypes') if not ct.viewless|default(false) %} {% setcontent records = ct.slug ~ "/latest/3" %}
{{ __('contenttypes.generic.recent', {'%contenttypes%': ct.name}) }}
    {% for record in records %}
  • {{ record.title }}
  • {% else %}
  • {{ __('contenttypes.generic.no-recent', {'%contenttype%': ct.slug}) }}
  • {% endfor %}

{{ __('contenttypes.generic.overview',{'%contenttypes%': ct.name}) }} »

{% endfor %} {{ widgets('aside_bottom') }}