Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I want to modify XSLTsearch to show the name of the property in which the search term was found. E.g. if the search term "umbraco" was found in the property with alias "bodyText" and name "Content", I want the results output to be:
It isn't simply a one or two line change. Basically, I would look at and re-factor the displayFieldText template in the /app_code/xsltsearch.cs file to become two steps. First is return the field the search term is found in (so you can save it as a variable and display it in your output). Then pass that field into another template to return the same thing as now is returned in the displayField variable (which you'll find around line 350)
<xsl:variable name="displayField"> <xsl:call-template name="displayFieldText"> <xsl:with-param name="item" select="."/> <xsl:with-param name="fieldList" select="$previewFields"/> </xsl:call-template> </xsl:variable>
Have fun and good luck.
Thanks Doug, I will come back to this problem and update this thread sometime in the future.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted