We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8f1bae commit 0c7d345Copy full SHA for 0c7d345
web/profiles/custom/os2loop/themes/os2loop_theme/templates/content-entities/os2loop_documents_title.html.twig
@@ -1,4 +1,6 @@
1
-{% if content.os2loop_documents_title is not empty %}
+{# @see https://www.previousnext.com.au/blog/right-way-check-empty-content-twig #}
2
+{% set rendered_title = content.os2loop_documents_title|render %}
3
+{% if rendered_title|trim %}
4
{% set toc_ignore = paragraph.get('os2loop_documents_toc_ignore').value == 1 %}
- <h2 class="{{ toc_ignore ? 'toc-ignore' }}">{{ content.os2loop_documents_title }}</h2>
5
+ <h2 class="{{ toc_ignore ? 'toc-ignore' }}">{{ rendered_title }}</h2>
6
{% endif %}
0 commit comments