I'm pretty new user of SharePoint and i work with SharePoint 2010. I try to show the "StartDate" column of a page in my XSL template but it won't show. I put the column in the webpart configuration widget for my variable @DatePublication. I tested with the Title and Content column, they show well, but the date won't.
I try to put the Column "StartDate" into my @DatePublication variable.
First i set the variable name at @Date only, i guessed it can be a reserved word. I changed it to @DatePublication, wrapped it with "string()", i tried to convert the date with "ddwrt:FormatDate(@ArticleStartDate, 2057, 3)" from http://blogs.msdn.com/b/joshuag/archive/2009/03/25/custom-date-formats-in-sharepoint-xsl.aspx, didn't work.
What i did wrong? How can i show the Date in my template?
Thank you very much
<xsl:template name="ListeActualites" match="Row[@Style='ListeActualites']" mode="itemstyle">
<xsl:variable name="SafeLinkUrl">
<xsl:call-template name="OuterTemplate.GetSafeLink">
<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
</xsl:call-template>
</xsl:variable>
<html>
<article class="contenu-bg">
<div class="row">
<div class="image">
<img class="image" src="" title="" />
</div>
<div class="col-lg-offset-4 col-md-offset-5 col-lg-8 col-md-7 col-sm-offset-5 col-sm-7 col-xs-offset-5 col-xs-7 contenu">
<div class="date"><xsl:value-of select="string(@DatePublication)"/></div>
<h2><a href="{$SafeLinkUrl}"><xsl:value-of select="@Title" /></a></h2>
<p><xsl:value-of select="substring(@Contenu,0,200)" disable-output-escaping="yes" />...</p>
<div class="tags"><xsl:value-of select="@Sujet" /></div>
</div>
</div>
</article>
</html>
</xsl:template>