Copied to clipboard

Flag this post as spam?

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


  • bhunt 18 posts 22 karma points
    Mar 24, 2009 @ 22:55
    bhunt
    0

    News Items with Go Live Dates

    Hi-

    I have created a new doc type for announcements and also one for an announcements list. Each announcement has title, body, goLiveDate, expireDate.

    I am trying to write an XSLT to show the news items that should be live based on the goLiveDate compared to the current date. Then I will add the expire date functionality, but I am having trouble with even the goLiveDate.

    Here is the XSLT that I am using (I am writing out the dates to the screen to ensure those are working and they are.) The output is not giving errors, but there are no news announcements showing up either.

    Is there a problem with the code below? Thanks!

    [code]
    ]>

    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library"
    exclude-result-prefixes="msxml umbraco.library">





    Announcement Separator



    [/code]

  • bhunt 18 posts 22 karma points
    Mar 27, 2009 @ 15:58
    bhunt
    0

    After some more thinking and reading, I realized that dates are stored as strings in the XML so the comparison I was trying to make would not work.

    Here is code that does work:
    [code]

    ]>

    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library"
    exclude-result-prefixes="msxml umbraco.library">





    Announcement Separator




    [/code]

Please Sign in or register to post replies

Write your reply to:

Draft