Closed aleclerc7 closed 2 years ago
Hello,
partials/podcast_episodes_list.html.twig lines 12-18:
{% if (e.header.publish_date) %} {% set datestamp = e.header.publish_date %} {% elseif (e.header.date) %} {% set datestamp = e.header.date %} {% else %} {% set datestamp = e.modified %} {% endif %}
It can be written in one line: {% set datestamp = e.header.publish_date ?: e.header.date ?: e.modified %}
{% set datestamp = e.header.publish_date ?: e.header.date ?: e.modified %}
Kind regards.
Thanks. I'm aware of the ternary syntax, but I find the extra cognitive load to not be worth the lesser number of code lines.
Hello,
partials/podcast_episodes_list.html.twig lines 12-18:
It can be written in one line:
{% set datestamp = e.header.publish_date ?: e.header.date ?: e.modified %}
Kind regards.