I think
we've found a limitation in Umbraco when using "publish at" and
"remove at" dates.
To explain
the situation I have a flashbanner loading data from Umbraco. The banner is
changing between 6 images.
All bannerimages are in a seperate folder in Umbraco, and I'm using xslt to
genereate the XML for flash.
The problem
is that when I have more than 10 published images in the Umbraco folder it
takes the last image in the folder an place it as number 3 in the XML.
If I just
keep the number of published images on 10 or lower, there's no problem with the
order of the images.
I can't
quite figure out if this is a bug in Umbraco, or whether there's (for some reason),
deliberately placed a limit in Umbraco, so it's not possible to use
"publish at" and "remove at" when there's more than 10
items.
I think part of the problem has to do with the <xsl:sort> statement - the default data-type is "text" which will make "10" come right after "1". Add the data-type attribute like this:
Problem when using "publish at" and "remove at"
Hey
I think we've found a limitation in Umbraco when using "publish at" and "remove at" dates.
To explain the situation I have a flashbanner loading data from Umbraco. The banner is changing between 6 images.
All bannerimages are in a seperate folder in Umbraco, and I'm using xslt to genereate the XML for flash.
The problem is that when I have more than 10 published images in the Umbraco folder it takes the last image in the folder an place it as number 3 in the XML.
If I just keep the number of published images on 10 or lower, there's no problem with the order of the images.
I can't quite figure out if this is a bug in Umbraco, or whether there's (for some reason), deliberately placed a limit in Umbraco, so it's not possible to use "publish at" and "remove at" when there's more than 10 items.
Hope somone can help!
Hi Signe,
Could be a little more specific with regards to how you're using the "Publish at" & "Remove at" properties?
Also, It'd be very helpful if you could post a sample of the XML you're generating and the XSLT to do that.
Does the mis-ordering happen in the XML file or in the frontend (i.e. when displayed inside of Flash) ?
/Chriztian
The mis-ordering happens before connecting to flash, it's already there when I visualize my XSLT - so the problem has nothing to do with flash.
My XSLT looks like this:
<data>
<general>
<timer><xsl:value-of select="$currentPage/seconds"/></timer>
<imageRoot></imageRoot>
</general>
<xsl:for-each select="$currentPage/Bannerimage">
<xsl:sort select="@sortOrder"/>
<xsl:if test="position()<7">
<bannerElement>
<buttonText><xsl:value-of select="text"/></buttonText>
<image><xsl:value-of select="image"/></image>
<link><xsl:value-of select="link"/></link>
<linkTarget><xsl:value-of select="linkTarget"/></linkTarget>
<xsl:if test="startDate != ''">
<startDate><xsl:value-of select="umbraco.library:FormatDateTime(startDate, 'dd-MM-yyyy')"/></startDate>
</xsl:if>
<xsl:if test="endDate != ''">
<endDate><xsl:value-of select="umbraco.library:FormatDateTime(endDate, 'dd-MM-yyyy')"/></endDate>
</xsl:if>
</bannerElement>
</xsl:if>
</xsl:for-each>
</data>
Hi Signe,
I think part of the problem has to do with the <xsl:sort> statement - the default data-type is "text" which will make "10" come right after "1". Add the data-type attribute like this:
- and see if that doesn't help part of the problem.
/Chriztian
is working on a reply...