Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UHF-9249: Use the new description override field #841

Merged
merged 5 commits into from
Dec 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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