Prechádzať zdrojové kódy

trying to fix the news url in template

bach 3 rokov pred
rodič
commit
80bb244e59

+ 9 - 8
web/themes/custom/materiotheme/templates/simplenews-newsletter-body.html.twig

@@ -38,12 +38,13 @@
  * @see template_preprocess_simplenews_newsletter_body()
  */
 #}
+
 <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
   <tbody>
     <tr>
       <td style="padding: 37px 0; background-color: #eeeeee; text-align:center;" align="center" bgcolor="#eeeeee">
         <!-- #nl_container -->
-        <p style="text-align:center; margin:5px 0;"><a href="{{ node.getURL }}" style="font-size:9px; color:#444444;">Voir la version en ligne / View this email on the web</a>
+        <p style="text-align:center; margin:5px 0;"><a href="{{ path('entity.node.canonical', {'node': node.id}) }}" style="font-size:9px; color:#444444;">Voir la version en ligne / View this email on the web</a>
         <table bgcolor="#ffffff" style="margin: 0 auto; color: #444444; font-family: arial; font-size: 12px; background-color: #ffffff; float:none; position:relative;" width="600" border="0" cellspacing="0" cellpadding="0">
           <tbody>
             <tr>
@@ -72,23 +73,23 @@
                                                   <tbody>
                                                     <tr>
                                                       <td style="padding: 2px; margin: 0; vertical-align: top;">
-                                                        <a href="http://www.facebook.com/sharer.php?u={{ node.getURL }}" target="_blank" style="display: block; border: none; text-decoration: none;">
-                                                          <img src="http://materio.com/sites/default/files/ico_social_facebook.png" alt="Facebook" style="vertical-align: top; border: none;">
+                                                        <a href="http://www.facebook.com/sharer.php?u={{ path('entity.node.canonical', {'node': node.id}) }}" target="_blank" style="display: block; border: none; text-decoration: none;">
+                                                          <img src="https://materio.com/sites/default/files/ico_social_facebook.png" alt="Facebook" style="vertical-align: top; border: none;">
                                                         </a>
                                                       </td>
                                                       <td style="padding: 2px; margin: 0; vertical-align: top;">
-                                                        <a href="http://twitter.com/share?url={{ node.getURL }}" target="_blank" style="display: block; border: none; text-decoration: none;">
-                                                          <img src="http://materio.com/sites/default/files/ico_social_twitter.png" alt="Twitter" style="vertical-align: top; border: none;">
+                                                        <a href="http://twitter.com/share?url={{ path('entity.node.canonical', {'node': node.id}) }}" target="_blank" style="display: block; border: none; text-decoration: none;">
+                                                          <img src="https://materio.com/sites/default/files/ico_social_twitter.png" alt="Twitter" style="vertical-align: top; border: none;">
                                                         </a>
                                                       </td>
                                                       <td style="padding: 2px; margin: 0; vertical-align: top;">
-                                                        <a href="http://www.linkedin.com/shareArticle?url={{ node.getURL }}" target="_blank" style="display: block; border: none; text-decoration: none;">
-                                                          <img src="http://materio.com/sites/default/files/ico_social_linkedin.png" alt="Linkedin" style="vertical-align: top; border: none;">
+                                                        <a href="http://www.linkedin.com/shareArticle?url={{ path('entity.node.canonical', {'node': node.id}) }}" target="_blank" style="display: block; border: none; text-decoration: none;">
+                                                          <img src="https://materio.com/sites/default/files/ico_social_linkedin.png" alt="Linkedin" style="vertical-align: top; border: none;">
                                                         </a>
                                                       </td>
                                                       <td style="padding: 2px; margin: 0; vertical-align: top;">
                                                         <a href="http://pinterest.com/hello0691/ze-daily-mat%C3%A9rio/" target="_blank" style="display: block; border: none; text-decoration: none;">
-                                                          <img src="http://materio.com/sites/default/files/ico_social_pinterest.png" alt="Pinterest" style="vertical-align: top; border: none;">
+                                                          <img src="https://materio.com/sites/default/files/ico_social_pinterest.png" alt="Pinterest" style="vertical-align: top; border: none;">
                                                         </a>
                                                       </td>
                                                     </tr>