- This topic has 8 replies, 2 voices, and was last updated 6 years, 3 months ago by .
Viewing 9 posts - 1 through 9 (of 9 total)
Viewing 9 posts - 1 through 9 (of 9 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › Display different templates when there are one or many events in scope?
I’m using events-made-easy to manage training courses. There are only a few dozen held every year and for some categories there is only one in scope. I would like to have a different template displayed when there is only one event in scope.
When there is one in the list I don’t want to display:
<ol>
<li>Jul 17</li>
</ol>
I want to display
<p>Jul 17</p>
If you *know* you have only 1 event, then use [eme_events] and it’s template-options for header/footer/entry. That’ll do it.
We don’t know when we’ll have one event.
At some points in the year there will be three events in scope and as time rolls on, two events and then only one event.
I was hoping that there was something clever that I could do with conditional logic to determine whether more than one event was in scope.
I guessed that much 🙂
Well, currently there is no placeholder for the amount of events in a list, but that should be easy to add …
This should do it:
http://plugins.trac.wordpress.org/changeset/1918059
That’s very cool.
thanks
I’m using #_EVENT_COUNTER in a template. I’m expecting 1, 2, 3. Instead I’m getting 3ER, 3ER, 3ER.
In other words I’m getting $_EVENT_COUNT .’ER’
Correct, this will fix it: http://plugins.trac.wordpress.org/changeset/1918648
Well done.
thank you