Add a teaser template for case studies
This commit is contained in:
parent
bc1f7e8d45
commit
3712f6eff5
1 changed files with 31 additions and 0 deletions
31
agaric/templates/layout/node--case-study--teaser.html.twig
Normal file
31
agaric/templates/layout/node--case-study--teaser.html.twig
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{# Somewhat ironically, we take away the ability for case studies to be
|
||||||
|
represented by their title paragraph. Because we *don't* use the title
|
||||||
|
paragraph for the main listings on the front page and the /work page (both of
|
||||||
|
which use the tile view mode, which uses only set regular fields), the use of
|
||||||
|
the title paragraph for search results (and anywhere else we use teasers)
|
||||||
|
would be a surprise— the summary field, while also not used on the listing
|
||||||
|
pages, is at least consistently used across multiple content types.
|
||||||
|
|
||||||
|
See agaric/templates/layout/node--teaser.html.twig for variables.
|
||||||
|
#}
|
||||||
|
|
||||||
|
<a class="teaser media content" href="{{ url }}">
|
||||||
|
|
||||||
|
<div class="media-left">
|
||||||
|
{{ content.field_image }}
|
||||||
|
{% if node.bundle == 'case_study' and content.field_subtitle is not empty %}
|
||||||
|
<p class="byline is-mono">
|
||||||
|
{{ content.field_case_study_subtitle }}
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="media-content content">
|
||||||
|
<h3 class="title is-5">{{ label }}</h3>
|
||||||
|
<div class="subtitle is-6">
|
||||||
|
{{ content.field_summary }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
<!-- Unexpected extra content -->
|
||||||
|
{{ content|without('field_body_paragraph', 'field_subtitle', 'field_image', 'field_summary', 'uid', 'created') }}
|
Loading…
Reference in a new issue