Copied to clipboard

Flag this post as spam?

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


  • savantKing99 70 posts 120 karma points
    May 12, 2013 @ 19:14
    savantKing99
    0

    Date

    Hi everybody,

    I have choosen as propertie: Date.

    and in the XSLT:

    <b>publicatie datum:</b>&nbsp;<xsl:value-of select="publicatieDatum"/>

    But I get this ugly format:

  • Fuji Kusaka 2203 posts 4220 karma points
    May 12, 2013 @ 19:21
    Fuji Kusaka
    1

    Try this instead

    <xsl:value-of select="umbraco.library:FormatDateTime(@publicatieDatum, 'dd MMMM yyy')"/>
  • savantKing99 70 posts 120 karma points
    May 12, 2013 @ 19:35
    savantKing99
    0

    Thx,

    but I dont see the date now:

    xslt:

     <b>Publicatie Dautm:</b>&nbsp;<xsl:value-of select="umbraco.library:FormatDateTime(@publicatieDatum, 'dd MMMM yyy')"/>

  • Fuji Kusaka 2203 posts 4220 karma points
    May 12, 2013 @ 19:53
    Fuji Kusaka
    0

    Can you republish your content to see again. Weird this should be working.

    Otherwise can you show us your code  ?

  • savantKing99 70 posts 120 karma points
    May 12, 2013 @ 20:07
    savantKing99
    0

    this is the hole code:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <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>&nbsp;<xsl:value-of select="umbraco.library:FormatDateTime(@publicatieDatum, 'MM/dd/yyyy')"/>

                <p>
                <b> Titel:</b>&nbsp;<xsl:value-of select="./@nodeName"/>
                </p>
                <p>
                    <b>Omschrijving:</b>&nbsp;  <xsl:value-of select="./omschrijving"/>
              </p>
               
               
                <b>Prijs:</b>&nbsp;<xsl:value-of select="prijs"/>
               
              <p>
                <xsl:choose>
                  <xsl:when test="string-length(./kristalPlaatje1) &gt; 0">
                    <img src="{umbraco.library:GetMedia(./kristalPlaatje1, true())/umbracoFile}" />
                      &nbsp;
                    <img src="{umbraco.library:GetMedia(./kristalPlaatje2, true())/umbracoFile}" />
                      &nbsp;
                    <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.

  • Fuji Kusaka 2203 posts 4220 karma points
    May 12, 2013 @ 20:20
    Fuji Kusaka
    0
    <xsl:value-of select="umbraco.library:FormatDateTime(./@publicatieDatum, 'MM/dd/yyyy')"/>

     

  • savantKing99 70 posts 120 karma points
    May 12, 2013 @ 20:31
    savantKing99
    0

    I also triied: DateTime but then I have it now as Date as property.

    But still no date visible:

    [xslt]

    Publicatie Datum: 

    [/xslt]

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    May 13, 2013 @ 08:22
    Chriztian Steinmeier
    0

    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

     

Please Sign in or register to post replies

Write your reply to:

Draft