Events Made Easy › Forums › How do I … › Events List – different format
Tagged: events_list format
- This topic has 5 replies, 3 voices, and was last updated 12 years, 9 months ago by Anonymous.
-
AuthorPosts
-
Thu 10 Mar 2011 at 22:55 #42630AnonymousInactive
I’m trying to use the shortcode with the format: argument.
[events_list category=3+6 showperiod=daily limit=0 format:=<li class=”#_ATT{ICON} eme_list_print”><div class=”event-date”><span class=”time”>#_ATT{TIME}{#g:#i#a – #@g:#@i#@a }</span>
#m/#d/#y (#D)[events_if tag='#_LOCATION' value='' notvalue]
at #_LOCATION[/events_if]</div><div class=”event-info”><span class=”event-name”>#_LINKEDNAME</span>
#_EXCERPT
Categories: #_CATEGORIES</div><div class=”clear”></div>]I’ve also tried “format:” without the colon.
It still picks up the format defined in settings.
Have I misinterpreted what this is supposed to do?
You can see where I’m trying this:
http://theater.studio3arts.com/wizard-of-oz/print
/Wendy
Thu 10 Mar 2011 at 23:33 #47184FrankyKeymasterYou have “format:=”, should be “format=”. The “:” in the doc was part of the rest of the sentence and has been removed to solve the confusion. Also the whole thing needs to be quoted, otherwise the spaces will cause trouble (and watch out for quotes inside quotes …)
Tue 29 Mar 2011 at 23:01 #47185AnonymousInactiveOK, I figured out that the problem is that the shortcode format doesn’t like conditionals. I was trying to use the [events_if…] and that makes the format blow up.
Sun 12 Feb 2012 at 18:21 #47186AnonymousInactiveI am trying to do something similar (although not so complex). I just want to change the way certain events are displayed on a certain page.
Here is the shortcode I am using right now:
[events_list category=9 scope=0000-02 format="<ul id="prod_dls"><li class="prod_dl_title">#_EVENTNAME<li class="prod_dl_date">#_{l, F j, Y}"]
I have tried it with and without the quotes around the formatting code, but neither works. What am I doing wrong?
Sun 12 Feb 2012 at 18:30 #47187FrankyKeymasterAs said before: watch out for quotes inside quotes. You use double quotes for the format value, but also double quotes inside it. For all intents and purposes, a program will interpret (in your case) the value for format as “<ul id=”
Try using single quotes *inside* the format string. Eg.
[events_list category=9 scope=0000-02 format="<ul id='prod_dls'><li class='prod_dl_title'>#_EVENTNAME<li class='prod_dl_date'>#_{l, F j, Y}"]
Sun 12 Feb 2012 at 18:36 #47188AnonymousInactivePerfect! That worked! Thank you so much! If I might be so bold, it might be helpful to add that little tidbit of information (and perhaps an example?) on the documentation so that other slightly-ignorant people like me don’t have to bug you with such mundane questions 😛
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.