-
Notifications
You must be signed in to change notification settings - Fork 22
/
views-view-fields--newspage--page.html.twig
53 lines (52 loc) · 1.86 KB
/
views-view-fields--newspage--page.html.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
{#
/**
* @file
* Theme override to display all the newspage fields in a row.
*
* Available variables:
* - view: The view in use.
* - fields: A list of fields, each one contains:
* - content: The output of the field.
* - raw: The raw data for the field, if it exists. This is NOT output safe.
* - class: The safe class ID to use.
* - handler: The Views field handler controlling this field.
* - inline: Whether or not the field should be inline.
* - wrapper_element: An HTML element for a wrapper.
* - wrapper_attributes: List of attributes for wrapper element.
* - separator: An optional separator that may appear before a field.
* - label: The field's label text.
* - label_element: An HTML element for a label wrapper.
* - label_attributes: List of attributes for label wrapper.
* - label_suffix: Colon after the label.
* - element_type: An HTML element for the field content.
* - element_attributes: List of attributes for HTML element for field content.
* - has_label_colon: A boolean indicating whether to display a colon after
* the label.
* - element_type: An HTML element for the field content.
* - element_attributes: List of attributes for HTML element for field content.
* - row: The raw result from the query, with all data it fetched.
*
* @see template_preprocess_views_view_fields()
*/
#}
{% embed "@molecules/cards/card.twig"
with {
"classes": [
"card"
],
"url": fields.path.content,
"title": fields.title.content,
"read_more": "Read more"|t,
"card_header": fields.created.content,
"card_image_top": true,
"card_text": true,
"snippet": fields.body.content,
"card_links": true
}
%}
{# These blocks are defined in the embeded template #}
{# and we override them right here: #}
{% block card_image_top %}
{{ fields.field_image.content }}
{% endblock %}
{% endembed %}