XSL if ContentType has a given value
I am trying to determine content type of the item. I tried this but I think ContentType in results.aspx webpart is known with another name.
<xsl:if contenttype="mycustomcontenttype"> <xsl:Value-of select="contenttype" /> <xsl:if>
Your XSLT is badly formatted.
There is no such xsl:if attribute called contenttype - nor is there an <xsl:Value-of because all instructions are case-sensitive, and should be in lower case.
Your code should be something like this...
<xsl:if test="contenttype='mycustomcontenttype'"> <xsl:value-of select="contenttype" /> <xsl:if>
Or even this one-liner (no conditionals used at all):