Web developers wiki ASP.NET Sitecore Sharepoint Kentico by Evident Interactive

The problem: Sitecore items aren't correctly sorted in a XSL for-each when using the standard date field "created" or another date field.


Use sc:fld

< xsl:sort select=" sc:fld( '
created',. ) " order="descending"/>

instead of sc:field

< xsl:sort select=" sc:field( '__created',. ) " order="descending"/>

Sc:field uses the RenderField pipeline to allow customization when rendering. In this case we just want to sort so we can use sc:fld.

 © Evident Interactive BV