I am new to XSL language and I get this error with edited code:
"The variable or parameter "isdocument' is either not defined or it is out of scope"
Here is my line of code I am getting the error in:
<span class="srch-Title">
<a href="{$url}" id="{concat('CSR_',$id)}" title="{$url}">
<!-- this is where the error is -->
<xsl:if test="$isdocument = 1">
<!-- this is where the error ends -->
<xsl:value-of select="filename"/>
</xsl:if>
<!-- this is where the error is -->
<xsl:if test="$isdocument = 0">
<!-- this is where the error ends -->
<xsl:choose>
<xsl:when test="hithighlightedproperties/HHTitle[. != '']">
<xsl:call-template name="HitHighlighting">
<xsl:with-param name="hh" select="hithighlightedproperties/HHTitle" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</a>
I'm currently stuck on this issue where sharepoint won't display the document titles but it displays the first letter inside of the document such as the title would be: B
instead of providing the documents name.
The reason I want to change this is when I search for a document I get documents that pull the first letter of the document such as when I search for the word example:
B
here is a brief example of you searched for
example but the first letter in the document is B so sharepoint pulls B as the title.
www.example.com/folder/example_document.doc
And here's what I want:
Example_document.doc
here is a brief example of you searched for
example but the first letter in the document is B so sharepoint pulls B as the title.
www.example.com/folder/example_document.doc
Any ideas where to start? Thanks