Copied to clipboard

Flag this post as spam?

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


  • Signe 2 posts 22 karma points
    Aug 15, 2011 @ 15:34
    Signe
    0

    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!

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 8x admin c-trib
    Aug 15, 2011 @ 23:29
    Chriztian Steinmeier
    0

    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 

  • Signe 2 posts 22 karma points
    Aug 16, 2011 @ 09:28
    Signe
    0

    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()&lt;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>
     

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 8x admin c-trib
    Aug 16, 2011 @ 09:36
    Chriztian Steinmeier
    1

    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:

    <xsl:sort select="@sortOrder" data-type="number" />

    - and see if that doesn't help part of the problem.

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft