Thursday, February 9, 2012

Sitecore Fetch Squad

Automated crawler fetching websites and blogs from Sitecore content

Breaking xslt paradigm

Crawled: On February - 18 - 2009 Source

Hey guys,

writing xslt is some kind of special, isn’t it? As a original developer who started with php need to pay special attention to the xslt paradigm.

In my case I have a dropdown navigation with two columns after each 4 items where you need to split the current div tag into a new.

You can’t do something like this:

<xsl:if test=”position () = 4″>
</div><div class=”Submenu”>
</xsl:if>

Right?

The solution is some kind of “hack”, so only use this if you have tried to think over your code and another solution.

<xsl:variable name=”divider”>
  <![CDATA[</div><div class=”Column”>]]>
</xsl:variable>

Now you can do:

<xsl:if test=”(position() mod 4) = 0″>
  <xsl:value-of select=”$divider” disable-output-escaping=”yes”/>
</xsl:if>

Enjoy ;)

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