Events Made Easy › Forums › Bug fixed or feature request implemented › Weird behaviour on rendering a template for a booking list
- This topic has 4 replies, 2 voices, and was last updated 6 years, 2 months ago by Anonymous.
-
AuthorPosts
-
Sat 22 Sep 2018 at 09:51 #58473AnonymousInactive
Hi Franky,
i created templates for a booking list.
Header:
<table> <tr> <th style="min-width:25px;"><b>ID</b></th> <th><b>Fahrer<br />Beifahrer<br />Kontakt</b></th> <th style="min-width:70px;"><b>Anschrift</b></th> <th style="min-width:60px;"><b>Pers.<br />T-Shirt</b></th> <th style="min-width:70px;"><b>Tour</b> (MX-5)<br />Club<br />Anreise</th> </tr>
Content:
<tr> <td rowspan="2">#_BOOKINGID</td> <td><b>#_RESPNAME</b><br />[eme_if tag='#ESC_FIELDVALUE{1}']#_FIELDVALUE{28} #_FIELDVALUE{1}<br />[/eme_if]#_RESPEMAIL<br />#_RESPPHONE</td> <td>#_RESPADDRESS1<br />[eme_if tag='#ESC_RESPADDRESS2']#_RESPADDRESS2<br />[/eme_if]#_RESPZIP #_RESPCITY<br />#_RESPCOUNTRY</td> <td><b>#_FIELDVALUE{5} Pers.</b><br />#_FIELDVALUE{9}<br />#_FIELDVALUE{10}</td> <td><b>[eme_if tag='#_RESPSPACES{1}' value='1']Tour 1[/eme_if][eme_if tag='#_RESPSPACES{2}' value='1']Tour 2[/eme_if][eme_if tag='#_RESPSPACES{3}' value='1']Tour 3[/eme_if][eme_if tag='#_RESPSPACES{4}' value='1']Tour 4[/eme_if][eme_if tag='#_RESPSPACES{5}' value='1']Tour 5[/eme_if][eme_if tag='#_RESPSPACES{6}' value='1']Tour 6[/eme_if][eme_if tag='#_RESPSPACES{7}' value='1']Tour 7[/eme_if][eme_if tag='#_RESPSPACES{8}' value='1']Tour 8[/eme_if][eme_if tag='#_RESPSPACES{9}' value='1']KEINE TOUR[/eme_if][eme_if tag='#_RESPSPACES{10}' value='1']WARTE[/eme_if]</b> (#_FIELD{2})<br />#_FIELD{3}<br />#_FIELD{6}</td> </tr> <tr> <td colspan="4"><i>#_COMMENT</i></td> </tr>
Footer:
</table> #_BOOKEDSEATS Buchungen
All data is shwon correctly, that’s not the problem. But there is a huge amount of white space between top of the page and output of the booking list. When i take a look in the source-code of the rendered page, there a
<br />
after each opening and closing html-tag like<table> <tr> <td>
It looks like this (Data anonymized):
<table><br /> <tr><br /> <th style="min-width:25px;"><b>ID</b></th><br /> <br /> <th><b>Fahrer<br /> Beifahrer<br /> Kontakt</b></th><br /> <br /> <th style="min-width:70px;"><b>Anschrift</b></th><br /> <br /> <th style="min-width:60px;"><b>Pers.<br /> T-Shirt</b></th><br /> <br /> <th style="min-width:70px;"><b>Tour</b> (MX-5)<br /> Club<br /> Anreise</th><br /> </tr><tr><br /> <td rowspan="2">1751</td><br /> <td><b>Name **</b><br /> Name ***<br /> Mail ***<br /> Phone ***</td><br /> <td>Street ***<br /> City ***<br /> Country ***</td><br /> <td><b>2 Pers.</b><br /> NB<br /> S<br /> S</td><br /> <td><b>Tour 3<br /> </b><br /> Mx-5 Freunde Österreich<br /> Donnerstag</td><br /> </tr><br /> <tr><br /> <td colspan="4"><i>Ich werde von Mittwoch, 29.5-2.6 Sonntag im Hotel sein.</i></td><br /> </tr><tr><br /> <td rowspan="2">1752</td><br /> <td><b>Name ***</b><br />
All code is put into the “Text” area of the editor. Some time ago i activated “Gutenberg” editor. But while i disliked it, i deinstalled it. Could this be a reason?
Rgds,
Werner
Sat 22 Sep 2018 at 10:39 #58474FrankyKeymasterThat’s not really the reason. I need to take into account people that create templates using pure html, or people using the html editor. But normally I add the br only when needed (not in the table), certainly in the latest version (it needed tweaking). Which version are you on?
Sat 22 Sep 2018 at 11:01 #58476AnonymousInactiveI#m on the latest. 2.0.53
Sat 22 Sep 2018 at 11:21 #58477FrankyKeymasterOk, I just figured out something simple: did you set the option “convert newlines” in your template? If so, that will cause the problem too 🙂 Although EME doesn’t add br-tags for complete tables, ince you split them over 3 templates, my code will happily add tags if that option is set.
I’ll add extra code to just not add br-tags after tr/td and opening table tags too.
This should help:
https://plugins.trac.wordpress.org/changeset/1945172/events-made-easy/trunk/eme_functions.php
(but the option to not convert the newlines is still preferred)Sat 22 Sep 2018 at 12:40 #58478AnonymousInactiveOMG – you are my hero – that’s it! I ignored this option because … i don’t know why anymore. 😉
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.