- This topic has 3 replies, 2 voices, and was last updated 12 years, 11 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › events_if in templates (php)
Tagged: conditional tags, templates
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
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.
Thanks. I guess that’s just beyond my abilities, too bad…
Thanks. I guess that’s just beyond my abilities, too bad…