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.
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">
[/code]
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">
[/code]
is working on a reply...