Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Get past events from Composite.Community.EventCalendar

$
0
0
UPDATE: Argh! Just spotted that I misread which package you were asking about. There are two EventCalendars available in Composite, and I added an answer for the other one. Opps! I'll leave my reply up here for anyone else who makes the same mistake.



In the XSLT function Composite.Lists.EventCalendar.List , under the Template tab change:
<xsl:variable name="eventlist">
  <xsl:choose>
    <xsl:when test="$displayMode='true'">
      <xsl:copy-of select="/in:inputs/in:result[@name='GetEventCalendarXml']/*[user:CompareDate(@EndDate) &gt; 0]" />
    </xsl:when>
    <xsl:otherwise>
      <xsl:copy-of select="/in:inputs/in:result[@name='GetEventCalendarXml']/*[user:CompareDate(@EndDate) &lt; 0]" />
    </xsl:otherwise>
  </xsl:choose>
</xsl:variable>
... to:
<xsl:variable name="eventlist">
  <xsl:copy-of select="/in:inputs/in:result[@name='GetEventCalendarXml']/*" />
</xsl:variable>
This will give you all events from the GetEventCalendarXml function call. You can do the same with Composite.Lists.EventCalendar.Detail.

I'd also recommend changing the GetEventCalendarXml function call parameters so that "order ascending" is set to descending (z-a), and adding a "Page size" value, then have a go at adding Sorting and Paging.

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>