Events Made Easy Forums How do I … Events List – different format

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #42630
    Anonymous
    Inactive

    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

    #47184
    Franky
    Keymaster

    You 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 …)

    #47185
    Anonymous
    Inactive

    OK, 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.

    #47186
    Anonymous
    Inactive

    I 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?

    #47187
    Franky
    Keymaster

    As 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}"]

    #47188
    Anonymous
    Inactive

    Perfect! 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 😛

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