Events Made Easy › Forums › How do I … › Eventlist by a custom attribute
- This topic has 11 replies, 2 voices, and was last updated 12 years, 8 months ago by Franky.
-
AuthorPosts
-
Fri 30 Mar 2012 at 08:54 #43771AnonymousInactive
I have defined a custom attribute: Status.
I defined every event with status “open” or “closed”.
Now i would like to create an eventlist which should only display the “open” events.
I also have a “long” Eventlist which includes both, open AND closed. This works perfect.
Is there any shortcode for?
How can I realize this?
Fri 30 Mar 2012 at 09:13 #49576FrankyKeymasterUse conditional tags for this, see
Fri 30 Mar 2012 at 10:09 #49577AnonymousInactiveThanks for your answer.
I have read it but don’t understand how i can do it.
I tried: [events_if tag='#ESC_ATT{status}' value='open']
but it doesnt work…
Fri 30 Mar 2012 at 11:37 #49578FrankyKeymasterThat should work, assuming the attribute is called “status”. Where did you put this (in which EME settnigs field)?
Fri 30 Mar 2012 at 14:31 #49579AnonymousInactiveI put this as a shortcode in my page.
In the settings field:
– in the standard list format events: my standard format (#_town etc.), which i call with [events_list limit=60 showperiod=monthly scope=future] on my site.
On my other site, which should display the “open” events, i placed the shortcode [events_if tag='#ESC_ATT{status}' value='open'] – but it doesnt work…
Fri 30 Mar 2012 at 14:55 #49580FrankyKeymasterYou need to put it in the “standard list format” setting for events, so you can then decide wether or not to show a specific event:
[events_if tag='#ESC_ATT{status}' value='open']
<tr><td>This is #_EVENTNAME</td></tr>
[/events_if]Or you can use the available filter for events, see http://www.e-dynamics.be/wordpress/?cat=41
Mon 2 Apr 2012 at 06:37 #49581AnonymousInactiveThanks.
But my standard list format looks like:
Code:<tr>
<td borderColor=”#00ff00″>Date</td>
<td borderColor=”#00ff00″>Name</td>
<td borderColor=”#00ff00″>Location</td>
<td borderColor=”#00ff00″>Info</td>
</tr>
<tr>
<td borderColor=”#00ff00″>
[events_if tag="#ESCd #ESCm #ESCy" notvalue="#ESC@d #ESC@m #ESC@y"]#d.#m.#y bis #@d.#@m.#y[/events_if]
[events_if tag="#ESCd #ESCm #ESCy" value="#ESC@d #ESC@m #ESC@y"]#d.#m.#y[/events_if]</td>
<td borderColor=”#00ff00″>#_LINKEDNAME</td>
<td borderColor=”#00ff00″>#_TOWN</td>
<td borderColor=”#00ff00″>
[events_if tag='#ESC_ATT{status}']<b>#_ATT{status}</b>[/events_if]
#_NOTES</td>
</tr>
</table></font>This is working for my page with the shortcode “[events_list limit=40 showperiod=monthly scope=future] perfectly.
But now I would like to have a second page, with only the status=open events!
I dont know how i can realize your proposal with having two sites… because the “standard list format” is already set for my first page.
Mon 2 Apr 2012 at 07:38 #49582FrankyKeymasterLook at the “format” option for the [event_list] shortcode
Mon 2 Apr 2012 at 08:14 #49583AnonymousInactiveThats a good point.
I have tried it with the following code for the first test:
Code:[events_list format=”[events_if tag='#ESC_ATT{status}' value='open'] <tr><td>This is #_LOCATION</td></tr> [/events_if]“]But it shows the whole events, not only the status “open”…
Mon 2 Apr 2012 at 10:16 #49584FrankyKeymasterHmm …. I’ll check this out myself, but it might be that the conditional tags won’t work here.
I’m thinking about adding an option for event_list formats, so you can just choose the format as an ID then, that would solve most issues here (I hope). To be evaluated …
Mon 2 Apr 2012 at 10:35 #49585AnonymousInactiveThank you very much!
Mon 2 Apr 2012 at 11:26 #49586FrankyKeymasterFor now, I suggest to use the availble wordpress filters:
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.