• In the template editor I had the following.

    <div class=”gce-list-event gce-tooltip-event”>[event-title]</div>
    [if-single-day][start-time] – [end-time][/if-single-day]
    [if-multi-day][start-time] Ends:[end-date] – [end-time][/if-multi-day]
    [if-location]Location:[location][/if-location]
    [if-description]Description:[description][/if-description]
    [link newwindow=”true”]More details…[/link]

    After each line is processed the html would have two <br> after each part of the event. Previous versions did not do this. They only put in one. I had to put everything on one line and then put a <br> between each element printed. Is this a problem with the 3.0.13 Simple Calendar or is this how it should work.

    https://www.ads-software.com/plugins/google-calendar-events/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Nick Young

    (@nickyoung87)

    What do you have for your “Event Formatting” setting under the appearance section?

    Thread Starter solitzky

    (@solitzky)

    Preserve line breaks, auto paragraphs (default).

    Had no idea about these options at all. Will change them and see what they do.

    I put lines back so that each template for the event was on its own line in the editor. The first option puts in multiple breaks. The other options run the event out as one long string.

    Plugin Contributor Nick Young

    (@nickyoung87)

    Do you have a link to your calendar so I can take a look?

    Thread Starter solitzky

    (@solitzky)

    https://www.troop1sb.com/wordpress/

    Upcoming Events in column on left of page, blank lines appear between time, location, and details.

    Options is “Preserve line breaks, auto paragraphs (default)”. The other options string it all as one contagious line on the web page.

    Here is the template.

    <div class=”gce-list-event gce-tooltip-event”>[event-title]</div>
    [if-single-day][start-time] – [end-time][/if-single-day]
    [if-multi-day][start-time] Ends:[end-date] – [end-time][/if-multi-day]
    [if-location]Location:[location][/if-location]
    [if-description]Description:[description][/if-description]
    [link newwindow=”true”]More details…[/link]

    Plugin Contributor Nick Young

    (@nickyoung87)

    Do you get the same issue when running this on a default theme with no other plugins enabled? I just want to rule out if it is coming from somewhere else possibly.

    You can also use this as a reference: https://docs.simplecalendar.io/troubleshooting-theme-plugin-widget-conflicts/

    Thread Starter solitzky

    (@solitzky)

    Its going to take me a while to make these checks. The theme I inherit from is a Boy Scout theme from a web designer in Texas. I have overridden very little of it in my child. I’ll try and get to this in the next couple of days. For now I’ll put in my breaks in the template and make the templates all one line.

    Thread Starter solitzky

    (@solitzky)

    Upgraded to 3.0.14 of calendar which put the visual template editor back in. This removed the breaks I had put into the templates and put each template line in the editor on its own line. With the first appearance option my calendar now works fine. There are no extra breaks put into the output HTML stream. Don’t know if it was a problem with the editor or something else you fixed but works ok now.
    Here is the template.

    Would like to see some better documentation on the CSS though as the fonts the calendar uses override my pages fonts.

    Thread Starter solitzky

    (@solitzky)

    I noticed that the editor reformatted the templates. The end of conditionals are now at the beginning of the next line. This is how the editor formatted the template code that is displayed in the first post.

    <div class=”gce-list-event gce-tooltip-event”>[event-title]</div>
    [if-single-day][start-time] – [end-time]
    [/if-single-day][if-multi-day][start-time] Ends:[end-date] – [end-time]
    [/if-multi-day][if-location]Location:[location]
    [/if-location][if-description]Description:[description]
    [/if-description][link newwindow=”true”]More details…[/link]

    Plugin Contributor Nick Young

    (@nickyoung87)

    Yeah if you switch between the visual editor and the HTML editor then it will translate the breaks into line breaks or paragraphs. This is why we updated our default output, but for existing outputs it may still happen.

    It is working now for you though?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Too many html br tags inserted when using templates in Calendars’ is closed to new replies.