diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f6be6b2..f151da0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- ### Newsletters: allow unpublished to show in Email HTML preview + Previously the Email HTML of Newsletters would not display unpublished Articles. Now they will display so site-editors can verify and proof content before mailing. There is a content warning on the Node of any Articles that are unpublished. + + Note: Articles must still be manually published before sending the email, or could result in email recipients getting broken links. + + Resolves https://github.com/CuBoulder/tiamat-theme/issues/1517 +--- + - ### Remove wrap from info footer Resolves #1525. Removes wrapping from the site info contact footer to remove the extra space. diff --git a/templates/paragraphs/paragraph--newsletter-section--email-html.html.twig b/templates/paragraphs/paragraph--newsletter-section--email-html.html.twig index 595462e8..23a5d98c 100644 --- a/templates/paragraphs/paragraph--newsletter-section--email-html.html.twig +++ b/templates/paragraphs/paragraph--newsletter-section--email-html.html.twig @@ -25,14 +25,6 @@ {% for key, item in paragraph.field_newsletter_section_select %} {% if key|first != '#' %} - {# Unpublished check #} - {% if (item.entity.field_newsletter_article_select.entity and - item.entity.field_newsletter_article_select.entity.isPublished()) or - (item.entity.field_newsletter_content_title and - item.entity.field_newsletter_content_title.value|render) - or - item.entity.field_newsletter_content_text.value|render - %} {# Code to render selected article content (thumbnail) #} @@ -148,19 +140,11 @@
{% endif %} - {% endif %} {% endfor %} {% else %} {% for key, item in paragraph.field_newsletter_section_select %} {% if key|first != '#' %} - {# Unpublished check #} - {% if (item.entity.field_newsletter_article_select.entity and - item.entity.field_newsletter_article_select.entity.isPublished()) or - (item.entity.field_newsletter_content_title and - item.entity.field_newsletter_content_title.value|render) - or - item.entity.field_newsletter_content_text.value|render %}
@@ -274,7 +258,6 @@
- {% endif %} {% endif %} {% endfor %} {% endif %}