Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi everybody,
I have choosen as propertie: Date.
and in the XSLT:
<b>publicatie datum:</b> <xsl:value-of select="publicatieDatum"/>
But I get this ugly format:
Try this instead
<xsl:value-of select="umbraco.library:FormatDateTime(@publicatieDatum, 'dd MMMM yyy')"/>
Thx,
but I dont see the date now:
xslt:
<b>Publicatie Dautm:</b> <xsl:value-of select="umbraco.library:FormatDateTime(@publicatieDatum, 'dd MMMM yyy')"/>
Can you republish your content to see again. Weird this should be working.
Otherwise can you show us your code ?
this is the hole code:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]><xsl:stylesheet 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" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:umbraco.contour="urn:umbraco.contour" exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets umbraco.contour "><xsl:output method="xml" omit-xml-declaration="yes"/><xsl:param name="currentPage"/><xsl:template match="/"><!-- The fun starts here --> <ul> <xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']"> <li> <b>Publicatie Dautm:</b> <xsl:value-of select="umbraco.library:FormatDateTime(@publicatieDatum, 'MM/dd/yyyy')"/> <p> <b> Titel:</b> <xsl:value-of select="./@nodeName"/> </p> <p> <b>Omschrijving:</b> <xsl:value-of select="./omschrijving"/> </p> <b>Prijs:</b> <xsl:value-of select="prijs"/> <p> <xsl:choose> <xsl:when test="string-length(./kristalPlaatje1) > 0"> <img src="{umbraco.library:GetMedia(./kristalPlaatje1, true())/umbracoFile}" /> <img src="{umbraco.library:GetMedia(./kristalPlaatje2, true())/umbracoFile}" /> <img src="{umbraco.library:GetMedia(./kristalPlaatje3, true())/umbracoFile}" /> </xsl:when> <xsl:otherwise> <img src="{./uploadImage}" /> </xsl:otherwise> </xsl:choose> </p> </li> </xsl:for-each> </ul> </xsl:template></xsl:stylesheet>
I changed: MM dd yyyy to: MM/dd/yyyy but also this is not showing.
<xsl:value-of select="umbraco.library:FormatDateTime(./@publicatieDatum, 'MM/dd/yyyy')"/>
I also triied: DateTime but then I have it now as Date as property.
But still no date visible:
[xslt]
Publicatie Datum:
[/xslt]
Hi,
publicatieDatum is a custom property so it's not an attribute in the XML but an element, so you should remove the '@' sign, e.g.:
<xsl:value-of select="umbraco.library:FormatDateTime(publicatieDatum, 'MM/dd/yyyy')" />
/Chriztian
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Date
Hi everybody,
I have choosen as propertie: Date.
and in the XSLT:
<b>publicatie datum:</b> <xsl:value-of select="publicatieDatum"/>
But I get this ugly format:
Try this instead
Thx,
but I dont see the date now:
xslt:
<b>Publicatie Dautm:</b> <xsl:value-of select="umbraco.library:FormatDateTime(@publicatieDatum, 'dd MMMM yyy')"/>
Can you republish your content to see again. Weird this should be working.
Otherwise can you show us your code ?
this is the hole code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
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" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:umbraco.contour="urn:umbraco.contour"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets umbraco.contour ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<!-- The fun starts here -->
<ul>
<xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
<li>
<b>Publicatie Dautm:</b> <xsl:value-of select="umbraco.library:FormatDateTime(@publicatieDatum, 'MM/dd/yyyy')"/>
<p>
<b> Titel:</b> <xsl:value-of select="./@nodeName"/>
</p>
<p>
<b>Omschrijving:</b> <xsl:value-of select="./omschrijving"/>
</p>
<b>Prijs:</b> <xsl:value-of select="prijs"/>
<p>
<xsl:choose>
<xsl:when test="string-length(./kristalPlaatje1) > 0">
<img src="{umbraco.library:GetMedia(./kristalPlaatje1, true())/umbracoFile}" />
<img src="{umbraco.library:GetMedia(./kristalPlaatje2, true())/umbracoFile}" />
<img src="{umbraco.library:GetMedia(./kristalPlaatje3, true())/umbracoFile}" />
</xsl:when>
<xsl:otherwise>
<img src="{./uploadImage}" />
</xsl:otherwise>
</xsl:choose>
</p>
</li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
I changed: MM dd yyyy to: MM/dd/yyyy but also this is not showing.
I also triied: DateTime but then I have it now as Date as property.
But still no date visible:
[xslt]
Publicatie Datum:
[/xslt]
Hi,
publicatieDatum is a custom property so it's not an attribute in the XML but an element, so you should remove the '@' sign, e.g.:
/Chriztian
is working on a reply...