-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlisting.twig
93 lines (71 loc) · 3.18 KB
/
listing.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{{ include('partials/_header.twig') }}
{{ include ('partials/_navbar.twig') }}
<section id="two" class="wrapper style1 special">
<h2>{{ record.title }}</h2>
<div class="container">
<div align="left">
{{ record.body }}
</div>
<div class="box alt">
{% block main %}
{# This template is used for 'listings': Generic pages that list a number of
records from a certain contenttype. These records are available as an array
called 'records'. In the for-loop below, we iterate over the records that
are on this page. It can be used for overview pages like 'all entries', or
'all records tagged with kittens'. #}
{# If used for listing a taxonomy, we add a heading.: #}
{% if taxonomytype is defined %}
<h1>
{{ __('general.phrase.overview-for') }}
{% if taxonomy.options[slug] is defined %}
{{ taxonomy.options[slug] }}
{% else %}
{{ slug }}
{% endif %}
</h1>
{# Taxonomies are fetched unordered by design except if 'has_sortorder'
is set to true. This way we keep 'grouping' intact in the listing. #}
{% if not taxonomy.has_sortorder %}
{# If we specified an order in config.yml, sort them here, accordingly: #}
{% set records = records|order(app.config.get('general/listing_sort')) %}
{% endif %}
{% endif %}
{% for record in records %}
<article id="menuitem">
<h2><a href="{{ record.link }}">{{ record.title }}</a></h2>
{{ popup(record.image, 1200, 500) }}
{# display something introduction-like.. #}
{% if record.introduction %}
{{ record.introduction }}
{% elseif record.teaser %}
{{ record.teaser }}
{% else %}
<p>{{ record.excerpt(300, false, search|default('')) }}</p>
{% endif %}
<a href="{{ record.link }}">Read more...</a>
</article>
{% if not loop.last %}
<hr>
{% endif %}
{% else %}
<article>
<h2>{{ __('general.phrase.no-content-found') }}</h2>
<p>
{{ __("Unfortunately, no content could be found. Try another page, or go to the <a href=\"%paths_root%\">homepage</a>.", {'%paths_root%': path('homepage')} ) }}
</p>
</article>
{% endfor %}
{# If there are more records than will fit on one page, the pager is shown. #}
{{ pager(template = 'partials/_sub_pager.twig') }}
{% endblock main %}
<footer class="major">
<ul class="actions">
<li><a href="https://tickets.sha2017.org" class="scrolly button">Ticketshop</a></li>
</ul>
</footer>
</div>
</section>
{{ include('partials/_filler.twig') }}
{{ include('partials/_signup.twig') }}
{{ include('partials/_filler.twig') }}
{{ include('partials/_footer.twig') }}