I am using calendar XSLT macro from Business Website Starter Pack. I modified eventsArea macro so the calendar is stand alone macro now. It is used in main events area where it displays all events fine. Problem is that it is also used when individual event is browsed - I want all the events to be displayed as well but calendar displays only browsed event. I had it working fine in Umbraco 4.0.2 but I had to rewrite macros when upgraded to 4.7.1 and new schema so I guess I had to make mistake somewhere.
I'm not sure why you've added the './' in ./eventStartDateTime, I think it should just be 'eventStartDateTime' otherwise you are going up the tree a level.
old schema -> new schema XSLT problem
hi,
I am using calendar XSLT macro from Business Website Starter Pack. I modified eventsArea macro so the calendar is stand alone macro now. It is used in main events area where it displays all events fine. Problem is that it is also used when individual event is browsed - I want all the events to be displayed as well but calendar displays only browsed event. I had it working fine in Umbraco 4.0.2 but I had to rewrite macros when upgraded to 4.7.1 and new schema so I guess I had to make mistake somewhere.
I think that line where it fails is:
<xsl:variable name="eventsToday" select="count($currentPage//ancestor-or-self::* [@isDoc and Exslt.ExsltStrings:lowercase($currentDate) = Exslt.ExsltStrings:lowercase(umbraco.library:FormatDateTime(./eventStartDateTime, 'MMMM d, yyyy'))])" />
before upgrade I had it working fine with this line:
<xsl:variable name="eventsToday" select="count($currentPage/ancestor-or-self::node//node [@nodeTypeAlias='Event' and Exslt.ExsltStrings:lowercase($currentDate) = Exslt.ExsltStrings:lowercase(umbraco.library:FormatDateTime(data [@alias='eventStartDateTime'], 'MMMM d, yyyy'))])" />
I have tried:
<xsl:variable name="eventsToday" select="count($currentPage//ancestor-or-self::Event [(@isDoc and name()='Event') and Exslt.ExsltStrings:lowercase($currentDate) = Exslt.ExsltStrings:lowercase(umbraco.library:FormatDateTime(./eventStartDateTime, 'MMMM d, yyyy'))])" />
or
<xsl:variable name="eventsToday" select="count($currentPage//ancestor-or-self::* [(@isDoc and name()='Event') and Exslt.ExsltStrings:lowercase($currentDate) = Exslt.ExsltStrings:lowercase(umbraco.library:FormatDateTime(./eventStartDateTime, 'MMMM d, yyyy'))])" />
but none of these work. Any help/hint is appreciated :)
Hi,
I'm not sure why you've added the './' in ./eventStartDateTime, I think it should just be 'eventStartDateTime' otherwise you are going up the tree a level.
Rich
Hi Adam,
Try to break it down in to manageable chunks, so it's easier to see what's going on:
This way, you can always do a <xsl:copy-of /> at each step and see if the variable holds what you'd expect it to.
/Chriztian
is working on a reply...