[meta] Improve Twig templates

Created on 18 February 2023, over 1 year ago
Updated 11 September 2024, 16 days ago

One fix was mentioned in πŸ“Œ Docs and Code improvements, dead code removal, some fixes. Fixed but I think mimemail-message.html.twig needs to be examined and re-worked.

The suggestion from that other issue was:

     </style>
     {% endif %}
   </head>
-  <body id="mimemail-body" {% if ( module|length > 0 ) and ( key|length > 0 ) %}  {% set class = 'class="' ~ module ~ '-' ~ key ~ '"' %} {% endif %} >
+  {% set class = '' -%}
+  {%- if ( module is not empty ) and ( key is not empty ) -%}
+    {%- set class = 'class="' ~ module ~ '-' ~ key ~ '"' -%}
+  {%- endif %}
+  <body id="mimemail-body"{{ class }}>
     <div id="center">
       <div id="main">
         {{ body|raw }}
πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tr Cascadia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024