Tags
#sp #SP2010NL 3D AJAX ASP.Net CAML Cloud CodePlex CSS Document Sets Dynamics CRM FAST 2010 Forms Based Authentication InfoPath JavaScript jQuery Managed Metadata MOSS Object Model Search SharePoint Designer 2010 SharePoint Profile System Silverlight soccerino SP2010 Visual Studio 2010 Word Automation Workflow XSLTArchives
-
RSS Links
Tweets
- #ttpi uitje was super. achter een boot gehangen, Kubb, bbq en Paco op de trampoline: http://yfrog.com/evhbejpj 11:22:10 PM July 17, 2010 from TweetDeck
- Ik denk niet dat de ontvangst hier beter van wordt RT @patricksteenks: The Iphone 4 has arrived at #tamtam http://yfrog.com/mv89yj 01:35:17 PM July 15, 2010 from TweetDeck
- Ik voorspel een verlenging..... Zet jouw eigen voorspelling op http://TwitPool.nl/suqg en win een Sharp 46"LCD #wk2010 #oranje #ned 09:26:28 AM June 28, 2010 from Twitpool.nl Oranje WK2010 Pool
- Als v Persie 2 min. later had gescoord, en Kuijt niet voor die kameroenees geel was 't kat in 't bakkie geweest voor #twitpool, nu afwachten 09:38:59 PM June 24, 2010 from TweetDeck
- IE9 preview 3 ondersteunt Canvas met hardware acceleratie. Het wordt misschien ooit nog wat met die browser #tamtam 05:47:20 AM June 24, 2010 from TweetDeck
Displaying calendar items in an ItemStyle
We frequently get the question to display the next x upcoming events in a rollup webpart. A content query web part is very suitable for this, but you will needa custom ItemStyle. Below you will find the xsl to display events in the following
format:
The custom itemstyle checks for the difference between all day events, events that span multiple days and checks for start and end times.
To use this itemstyle you will need to add EventDate and EndDate to the CommonViewFields and reference the ddwrt namespace in the top of your xsl:
And finally here’s the itemstyle:
<xsl:template name="CalendarEvent" match="Row[@Style='CalendarEvent']" mode="itemstyle"> <xsl:variable name="SafeImageUrl"> <xsl:call-template name="OuterTemplate.GetSafeStaticUrl"> <xsl:with-param name="UrlColumnName" select="'ImageUrl'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="SafeLinkUrl"> <xsl:call-template name="OuterTemplate.GetSafeLink"> <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="DisplayTitle"> <xsl:call-template name="OuterTemplate.GetTitle"> <xsl:with-param name="Title" select="@Title"/> <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="LinkTarget"> <xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if> </xsl:variable> <xsl:variable name="MultiDayEvent"> <xsl:choose> <xsl:when test="starts-with(@EndDate,substring(@EventDate, 0, 11))"> 0 </xsl:when> <xsl:otherwise> 1 </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="StartTimeIsEndTime"> <xsl:choose> <xsl:when test="contains(@EndDate,substring(@EventDate, 11, 9))"> 1 </xsl:when> <xsl:otherwise> 0 </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="DisplayDate"> <xsl:choose> <xsl:when test="$MultiDayEvent = 0"> <xsl:choose> <xsl:when test="@fAllDayEvent = 0"> <xsl:choose> <xsl:when test="$StartTimeIsEndTime = 1"> <xsl:value-of select="ddwrt:FormatDateTime(string(@EventDate) ,1043 ,'dd-MM-yyyy H:mm')" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="ddwrt:FormatDateTime(string(@EventDate) ,1043 ,'dd-MM-yyyy H:mm')" /> - <xsl:value-of select="ddwrt:FormatDateTime(string(@EndDate) ,1043 ,'H:mm')" /> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="ddwrt:FormatDateTime(string(@EventDate) ,1043 ,'dd-MM-yyyy')" /> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="@fAllDayEvent = 0"> <xsl:value-of select="ddwrt:FormatDateTime(string(@EventDate) ,1043 ,'dd-MM-yyyy H:mm')" /> - <xsl:value-of select="ddwrt:FormatDateTime(string(@EndDate) ,1043 ,'dd-MM-yyyy H:mm')" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="ddwrt:FormatDateTime(string(@EventDate) ,1043 ,'dd-MM-yyyy')" /> - <xsl:value-of select="ddwrt:FormatDateTime(string(@EndDate) ,1043 ,'dd-MM-yyyy')" /> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:variable> <a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}"> <xsl:value-of select="$DisplayTitle"/> </a> <xsl:text> - </xsl:text><xsl:value-of select="$DisplayDate"/><br/> </xsl:template>No related posts.