Events Made Easy Forums How do I … events_if in templates (php)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43697
    Anonymous
    Inactive

    Hi,

    I have a calendar template, using php to display an events list. Some events last several days, some others a single day.

    I use

    <?php eme_get_events_list("scope=0000-09&limit=0&order=ASC&format=<tr><th>#_{D j} - #@_{D j}</th><td>#_LINKEDNAME</td></tr>"); ?>

    which produces a beginning and an end date in every case :

    Mon 5 – Wed 7 Event A

    Thu 8 – Thu 8 Event B

    To avoid this repetition for 1 day events, I have to use the events_if conditional tag as shown in the documentation

    #_{j M Y} [events_if tag="#ESC_{j M Y}" notvalue="#ESC@_{j M Y}"] #@_{- j M Y} [/events_if]

    I’ve tried to translate that into php, but I can’t make it work !

    Philippe

    #49313
    Franky
    Keymaster

    in templates you have to work with the real data for the event and compare those, not use placeholders. Do a print_r for an event to see all the data there is and what you can do with it.

    #49314
    Anonymous
    Inactive

    Thanks. I guess that’s just beyond my abilities, too bad…

    #49315
    Anonymous
    Inactive

    Thanks. I guess that’s just beyond my abilities, too bad…

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top