• I’m struggling with the Template Editor. For some reason, it isn’t displaying the {time} code at all. I’ve run several tests on the time-related codes:

    dstart: 2021-05-20T00:00:00
    dtend: 2021-05-20T23:59:59
    endtime:
    runtime: 24 hours
    time:

    The provided shortcodes in the template editor also say “No output for this event.” which I’m not sure I understand. The template editor wouldn’t have an associated event so I don’t know if that is just filled text or trying to actually tell me the code doesn’t output information. But it’s the time… I can’t see this not working for an Event plugin.

    I’ve double-checked the events had a time and I’ve ruled out theme and plugin conflicts. It is simply not showing up. Is there a fix for this? Or is there a hard-coded PHP template I could edit to override the dashboard templates?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    ‘endtime’ can have no output if the option to hide the event end time is checked or if the time format has no value.

    ‘time’ would have no value if the event is an all day event and the text for all day events has no value, or – again – if the template for time format is empty.

    The data shown in the template editor is for whatever your most recently created event is (next version will make that more clear, as that’s really not clear right now.)

    Looking at the ‘time’ template tag, it’s also possible that would return empty values if it started at midnight and had no all-day text defined, though I’d have to test to double check that.

    You can filter over the output for all template tags using the ‘mc_filter_shortcodes’ filter, as well, if you need to test the array or modify how an output is produced.

    Thread Starter Vanderbeam

    (@vanderbeam)

    I’m working around with 4 or 5 test events, all with different variables but all of them intentionally late morning/early afternoon times. But none of the detail times show up at all.

    I also realized I couldn’t implement PHP into the template editor, but I can’t find any resources for the correct hooks and files to modify the template from the theme files. Is this possible at all?

    Plugin Author Joe Dolson

    (@joedolson)

    Definitely possible. Here’s a demo for filtering in a custom template, structured as a custom plugin:

    https://github.com/joedolson/plugin-extensions/blob/master/my-calendar/mc-custom-template.php

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Template shortcodes not working?’ is closed to new replies.