-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_aside.twig
52 lines (31 loc) · 1.22 KB
/
_aside.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<aside>
{% if theme.showSidebarAbout %}
<div class="sidebar-section">
{% setcontent about = "page/about" %}
{% if about.title is defined %}
<h4>{{ about.title }}</h4>
{{ about.teaser }}
<a href="{{ about.link }}">{{ __("Read more") }} »</a>
{% else %}
<h5>{{ __("Alas, no about!") }}</h5>
<p>{{ __("If there was a Page with 'about' for a slug, it would've been shown here. But there isn't one, so that's why you're seeing this placeholder.") }}</p>
{% endif %}
</div>
{% endif %}
{% if theme.showSidebarRecent %}
{% for ct in app.config.get("contenttypes") if not ct.viewless|default(false) %}
<div class="sidebar-section">
{% setcontent records = ct.slug ~ "/latest/5" %}
<h4>{{ __("contenttypes.generic.recent", {"%contenttypes%": ct.slug}) }}</h4>
<ul>
{% for record in records %}
<li><a href="{{ record.link }}">{{ record.title }}</a></li>
{% else %}
<li>{{ __("contenttypes.generic.no-recent", {"%contenttype%": ct.slug}) }}</li>
{% endfor %}
</ul>
<p><a href="{{ paths.root }}{{ct.slug}}">{{ __("contenttypes.generic.overview",{"%contenttypes%": ct.slug}) }} »</a></p>
</div>
{% endfor %}
{% endif %}
<aside>