0

I need to display each calendar and the related events. The events are reoccurring and I want the dates and times for each occurrence to appear under the event title. To save my life I can't figure it out. I don't have much experience with Calendar and I've already spend a crazy amount of time trying to figure this out. It has to be simple but no luck. Below is an example of what I'm needing to display.

Calendar Title

Event Title

  • Day and Time
  • Day and Time
  • Event Title

  • Day and Time
  • Day and Time
  • Day and Time
  • Calendar Two Title

    Event Title

  • Day and Time
  • Day and Time
  • Each event has various days and times throughout a given week and I want to avoid displaying the event name over and over. I just need it to display cleaner.

    0

    VERY recommended initial reading on Calendar tag use: https://solspace.com/docs/calendar/getting_started/

    If you're looking to display an event, then display all its occurrences, then move to the next event, display all its occurrences, etc, then you should try {exp:calendar:events} with either {occurrences}...{/occurrences} or {exp:calendar:occurrences}...{/exp:calendar:occurrences} inside the {exp:calendar:events} tag pair. Eg.

    {exp:calendar:events /* your parameters */}
        <h2>{event_title}</h2>
        <p>This event happens on these days</p>
        {occurrences}
           {!-- Could use {exp:calendar:occurrences} as an alternative --}
           ... your occurrence code ...
        {/occurrences}
    {/exp:calendar:events /* your parameters */}
    

    Keep in mind that this does not create a chronological list of events, since occurrences will be listed one event after another, and therefore will not overlap if they overlap over time. See the above link (and image) for some more detailed explanations why.

    If you're looking for a chronological listing of event occurrences, in which event occurrences for each day, or on a specified day, are displayed chronologically, use {exp:calendar:cal}. This is the tag to use if you're looking for occurrences within a specific time frame. Eg.

    <h2>Event occurrences on August 3rd, 2015</h2>
    {exp:calendar:cal 
       date_range_start="2015-08-03"
       date_range_end="2015-08-03"
       pad_short_weeks="n"}
        {event_title}: {event_start_date format="%Y-%m-%d %H:%i"} ~ {event_end_date format="%Y-%m-%d %H:%i"}<br />
    {/exp:calendar:cal}
    
    | improve this answer | |
    0

    Perfect! I'm not sure what I was doing wrong before but this worked. Thought I had tried it but apparently without success. I read the documentation early on but evidently I had poor implementation. Thanks for the help. My issue was fixed within minutes.

    | improve this answer | |
    • Could please convert this to a comment on an answer or the original question? This is not an answer. – jrothafer Aug 5 '15 at 13:06
    • Also, please accept @Solspace's answer if it answered your question. – jrothafer Aug 5 '15 at 13:07

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

    Not the answer you're looking for? Browse other questions tagged or ask your own question.