There is no bloody way to get a node URL from a DS template
... 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?
This commit is contained in:
parent
3fa06f9ea8
commit
3777ffe098
1 changed files with 6 additions and 1 deletions
|
@ -13,11 +13,16 @@
|
|||
|
||||
{{ 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 %}
|
||||
<figure class="background-replacement-for-no-image image"></figure>
|
||||
<a href="/test" class="background-replacement-for-no-image image"></a>
|
||||
{% endif %}
|
||||
{{ ds_content|without('field_image') }}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue