Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Tony 13 posts 43 karma points
    Sep 11, 2012 @ 13:19

    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.

    <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)"/>
        <xsl:value-of select="date:dayinmonth($cell/@date)"/>
  • Peter Dijksterhuis 1442 posts 1722 karma points
    Sep 12, 2012 @ 09:05
    Peter Dijksterhuis


    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>


    this then will set a class on your a if the location is mainhall

    Does this help?


  • Tony 13 posts 43 karma points
    Sep 12, 2012 @ 12:05

    Thanks for the response AND solution to the problem I had.



Please Sign in or register to post replies

Write your reply to: