Thursday, February 9, 2012

Sitecore Fetch Squad

Automated crawler fetching websites and blogs from Sitecore content

util:GetString

Crawled: On December - 29 - 2008 Source
It might be not obvious but is common practice to use util:GetString(string, default).

A xsl:choose used to display the title of an item can be replaced as follows:


<xsl:choose>
<xsl:when test="sc:fld('menutitle',.)">
<xsl:value-of select="sc:fld('menutitle',.)">
</xsl:when>
<xsl:when test="sc:fld('title',.)">
<xsl:value-of select="sc:fld('title',.)">
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="./@name">
</xsl:otherwise>
</xsl:choose>

simpler call:


<xsl:value-of select="util:GetString(util:GetString(sc:fld('title',.), sc:fld('menutitle',.)),@name)"/>

The Sitecore Experience

Comments are closed.

Sitecore Lucene index does not remove old data

Posted by admin
Oct-30-2011 I Comments Off

Teach User Manager how to search by email

Posted by admin
Oct-30-2011 I Comments Off

Language filtered Multilist field

Posted by admin
Oct-30-2011 I Comments Off