Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is it possible to define a location of an event listed in the calendar and then change the colour of the the cell background accordingly?
eg. events in the main hall appear as red, events in the conference room appear green.
I've got it to change the colour if there is an event but want to change the colour depending on it's location also.
Any help would be great.
<xsl:choose> <xsl:when test="boolean($cell/event)"> <td class="caleventfound"> <xsl:for-each select="$cell/event"> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="date:dayinmonth($cell/@date)"/> </a> </xsl:for-each> </td></xsl:when> <xsl:otherwise> <td> <xsl:value-of select="date:dayinmonth($cell/@date)"/> </td></xsl:otherwise></xsl:choose>
Hi,
I presume you have a property which holds the location in your document right?
You can do something like this:
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:if test="umbraco.library:GetXmlNodeById(@id)/location = 'mainhall' ">
<xsl:attribute name="class">yourclass</xsl:attribute>
<xsl:value-ofselect="date:dayinmonth($cell/@date)"/>
</xsl:if>
</a>
this then will set a class on your a if the location is mainhall
Does this help?
Peter
Thanks for the response AND solution to the problem I had.
Thankyou!
Tony
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Add a location to the event
Is it possible to define a location of an event listed in the calendar and then change the colour of the the cell background accordingly?
eg. events in the main hall appear as red, events in the conference room appear green.
I've got it to change the colour if there is an event but want to change the colour depending on it's location also.
Any help would be great.
Hi,
I presume you have a property which holds the location in your document right?
You can do something like this:
this then will set a class on your a if the location is mainhall
Does this help?
Peter
Thanks for the response AND solution to the problem I had.
Thankyou!
Tony
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.