... not without the internet, at least. Why the hell can't you build associative arrays in Twig? Should have just done a preprocess function, but seriously, what in the hell?
29 lines
757 B
Twig
29 lines
757 B
Twig
{#
|
|
/**
|
|
* @file
|
|
* Display Suite 1 column template.
|
|
*
|
|
* Available variables:
|
|
* - ds_content_wrapper: wrapper around content
|
|
* - attributes: content region attributes
|
|
* - ds_content: content region
|
|
*/
|
|
#}
|
|
<{{ ds_content_wrapper }}{{ attributes.addClass('ds-1col', 'card', 'clearfix') }}>
|
|
|
|
{{ title_suffix.contextual_links }}
|
|
|
|
{% set route_options = [] %}
|
|
{% set route_options['node'] = node %}
|
|
{% set link_path = path('entity.node.canonical', route_options) %}
|
|
{{ url }}
|
|
{{ node.id }}
|
|
{% set image = ds_content.field_image|render %}
|
|
{% if image %}
|
|
{{ image }}
|
|
{% else %}
|
|
<a href="/test" class="background-replacement-for-no-image image"></a>
|
|
{% endif %}
|
|
{{ ds_content|without('field_image') }}
|
|
|
|
</{{ ds_content_wrapper }}>
|