Show Property Name of context where search term was found
Hi,
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:
In "Content": blah blah blah umbraco blah blah blah...
instead of
Context: blah blah blah umbraco blah blah blah...
What is the name of the variable that would contain this information so I can edit the xslt file's output?
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)
Show Property Name of context where search term was found
Hi,
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:
Hi, Max,
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)
Have fun and good luck.
cheers,
doug.
Thanks Doug, I will come back to this problem and update this thread sometime in the future.
Max
is working on a reply...