• Resolved jhnfhth

    (@jhnfhth)


    I very much appreciate the effort that is going in to getting this plugin fully functional again ! I’m wondering if there is a solution to this little problem.

    When displaying a gcal feed as a widget, I prefer to keep the display as brief as possible, and only display the date, event title and the location. Normally that works very well, as most events have a location – so I like to have the map link displayed too.
    So here’s the event builder code (with some important blank lines removed)

    [if-not-all-day][start-time]
    [/if-not-all-day]
    [event-title]
    [if-location]
    [location] [maps-link newwindow=”true”]Map[/maps-link]
    [/if-location]

    However, a few of our events do not have a location – they are just markers in the diary. For these, I do not wish to have the map link.

    One solution occurred to me. If I could not fill anything in on Google Calendar for the location and then trap the events in the Gcal feed, that do not have a location, I could display the description instead. But for that, I would need an [else] command or a [if-not-location] command.

    Failing all of that, I’ll just set the location to be the middle of the Atlantic. No-one will go there by mistake.

    https://ww.wp.xz.cn/plugins/google-calendar-events/

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

    (@nickyoung87)

    Failing all of that, I’ll just set the location to be the middle of the Atlantic. No-one will go there by mistake.

    That made me laugh 🙂

    So what you are suggesting is a little more flexibility by adding some kind of shortcode that can be used as an “else”? Am I understanding correctly?

    Thread Starter jhnfhth

    (@jhnfhth)

    Thanks for the reply Nick.

    Yes – I was wondering if something like that was available. Perhaps an [else] option or a ‘not’ operator or a [if-not-location] test.

    so something that would have the effect of either:

    [if-location]
    [location] [maps-link newwindow=”true”]Map[/maps-link]
    [else] [description]
    [/if-location]

    or:
    [if-location]
    [location] [maps-link newwindow=”true”]Map[/maps-link]
    [/if-location]

    [if-not-location]
    [description]
    [/if-not-location]

    Plugin Contributor Nick Young

    (@nickyoung87)

    @jhnfhth,

    I like the idea. I checked and we don’t have that available currently so it is something we would need to add in.

    I will discuss this one with Phil, but on a side note you should also add it to our public roadmap (feature request tracker) on Trello: https://trello.com/b/ZQSzsarY

    Thanks!

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

The topic ‘if-not-location’ is closed to new replies.