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

Newsletter: Missing Content - Adjusts Newsletter Section Content TItle Requirements #1229

Merged
merged 2 commits into from
Aug 21, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
{% 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) %}
item.entity.field_newsletter_content_title.value|render)
or
item.entity.field_newsletter_content_text.value|render
%}
{# Code to render selected article content (thumbnail) #}
<!--Feature Article-->
<table role="presentation" style="padding-bottom: 20px;">
Expand Down Expand Up @@ -67,7 +70,7 @@
</td>
</tr>
{# Code to render user made content (title) #}
{% elseif item.entity.field_newsletter_content_title.value|render %}
{% elseif item.entity.field_newsletter_content_title.value|render or item.entity.field_newsletter_content_text.value|render %}
{% if item.entity.field_newsletter_content_url.0.url %}
{% set actual_url = item.entity.field_newsletter_content_url.0.url.toString() %}
{% set is_absolute = (actual_url starts with 'http://' or actual_url starts with 'https://') %}
Expand Down Expand Up @@ -140,7 +143,9 @@
{% 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) %}
item.entity.field_newsletter_content_title.value|render)
or
item.entity.field_newsletter_content_text.value|render %}
<!--Teaser Article-->
<center align="left">
<table role="presentation" width="100%" style="padding-bottom: 20px;">
Expand Down Expand Up @@ -186,7 +191,7 @@
</td>

{# Code to render user made content (title) #}
{% elseif item.entity.field_newsletter_content_title.value|render %}
{% elseif item.entity.field_newsletter_content_title.value|render or item.entity.field_newsletter_content_text.value|render %}
{% if item.entity.field_newsletter_content_url.0.url %}
{% set actual_url = item.entity.field_newsletter_content_url.0.url.toString() %}
{% set is_absolute = (actual_url starts with 'http://' or actual_url starts with 'https://') %}
Expand Down
Loading