Support » Plugin: Event post » Multiple Options for Date Settings, Item Schema

  • For my application, I seem to need several Item Schemas and associated customized Date Settings. Here’s what I’m trying to solve:
    For the Home Page and Upcoming Events, I want a certain order: Title, Excerpt, Location, and Date, as follows (with the date being only month/day: eg: “Nov 11”:
    <%child% class="event_item %class%" data-color="%color%"> <a href="%event_link%"> <strong>%event_title%</strong> </a> <em>%event_excerpt% %event_location% </em> %event_date%</%child%>
    Second, I’d like a different arrangement on another web page, for copying/pasting into an email, with the order switched to Date, Location, Title, and Excerpt, such as:
    <%child% class="event_item %class%" data-color="%color%"> %event_date% %event_location% <a href="%event_link%"> <strong>%event_title%</strong> </a> <em>%event_excerpt% </em> </%child%>

    Third, for the Past Events (my archives), I’d like to expand the Date to include the year (eg: to “Nov 11, 2013”) and put the Item Schema fields in a different order, such as:
    <%child% class="event_item %class%" data-color="%color%"> %event_date% %event_location% <a href="%event_link%"> <strong>%event_title%</strong> </a> <em>%event_excerpt% </em> </%child%>

    To me, it looks as though I should install Event Post three times (labeled Events_List_A, Events_List_B, and Events_List_C), and then I can call the particular one that I need to format the page I’m rendering. But is there a built-in way to have differing Event renderings on different pages? Would it be difficult to implement such a multi-rendering method in an upcoming release? How would you go about doing this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bastien Ho

    (@bastho)

    Hi,

    each shortcode accept those arguments:

    [events_list container_schema="" item_schema=""]

    So you can display many HTML structure, even in the same page.

    Hope it helps

    pwesling

    (@pwesling)

    Bastien — Yes, I’m beginning to understand how to use a custom Item Schema in the code for a webpage. But I’m still not doing it correctly. When I use my custom code on a web page, it seems to be ignored, or maybe it is over-ridden by the default one that I entered in Settings / Event / Item Shema that should apply in general cases.
    Can you give me corrections to this code? For example, this might be the code on a web page:

    [events_list future="1" cat="meeting" excerpt="true" item_schema="%random% class="event_item %output%" %event_date% %event_location% data-color="%blue%" <a href="%event_link%"> <strong>%event_title%</strong> </a> <em>%event_excerpt% </em> </%random%>"]

    — I replaced %child% with %random% — is this OK, or does it need to be “child”?
    — I replaced %class% with my choice %output% — is this OK?
    — Do I have the “” and <> pairs accounted for?
    — As I say, this isn’t over-riding the default (so, my fields are not in the new order)
    — How would you write this, so that the metadata fields are in the new order in my item_schema=”” statement, rather then the default order? Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.