Skip to content

Commit

Permalink
Merge pull request #841 from City-of-Helsinki/UHF-9249_description-ov…
Browse files Browse the repository at this point in the history
…erride

UHF-9249: Use the new description override field
  • Loading branch information
dire authored Dec 21, 2023
2 parents 8cfea20 + 7043041 commit 42da489
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions templates/module/helfi_tpr/tpr-unit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
{% set has_ontologyword_details = content.field_ontologyword_details|render ? true : false %}
{% set has_subgroup = content.subgroup|render ? true : false %}
{% set has_other_info = content.highlights|render or content.topical|render or content.other_info|render or content.links|render ?: false %}
{% set description = content.description.0['#text'] ? content.description : content.enrich_description %}
{% set show_description = description.0['#text'] and hide_description == false ?: false %}

{% set supports_swedish %}
{% if 'sv' in provided_languages %}
Expand Down Expand Up @@ -65,9 +67,9 @@
{% endif %}
{# End of Main image #}

{% if content.description|render and hide_description == false %}
{% if show_description %}
<div class="long-desc user-edited-content">
{{ content.description }}
{{ description }}
</div>
{% endif %}

Expand Down

0 comments on commit 42da489

Please sign in to comment.