I've tried to put more properties in my "previewFields" but with no success.
I would like my results to show:
Title (homepageArticleTitle) - This it already shows.
Date (homepageArticleDate)
Teaser (homepageArticleTeaser)
Description (homepageArticleBodyText - This it already shows.
Can this be done? Is there a smart way to incooporate more properties into the results? Thank you very much up front. Anything helps!
The previewFields parameter is a list of fields to look for, but XSLTsearch will only show the first one that has content in it. That way, a teaser could display for magazine articles but for an event page that doesn't have a teaser field you could display a 'summary' field for instance. The previewFields parameter doesn't mean it shows all of the field, just the first one that is present and has a value.
To change what XSLTsearch outputs, you'd need to update the xsltsearch.xslt file for your specific needs.
Note: if you're not overly familiar with XSLT you might consider using ezSearch instead. This is the razor version of XSLTsearch and does all the same things (and a few additional things as well). Use whichever package is easier for you to work with from a coding perspective.
Show specific properties in XSLT Search
Hey guys,
I have XSLT search on my site. At current, it only shows the title and description of my results.
This is my macro call in my template:
I've tried to put more properties in my "previewFields" but with no success. I would like my results to show:
Title (homepageArticleTitle) - This it already shows. Date (homepageArticleDate) Teaser (homepageArticleTeaser) Description (homepageArticleBodyText - This it already shows.
Can this be done? Is there a smart way to incooporate more properties into the results? Thank you very much up front. Anything helps!
Hi, David,
The
previewFields
parameter is a list of fields to look for, but XSLTsearch will only show the first one that has content in it. That way, a teaser could display for magazine articles but for an event page that doesn't have a teaser field you could display a 'summary' field for instance. The previewFields parameter doesn't mean it shows all of the field, just the first one that is present and has a value.To change what XSLTsearch outputs, you'd need to update the xsltsearch.xslt file for your specific needs.
Note: if you're not overly familiar with XSLT you might consider using ezSearch instead. This is the razor version of XSLTsearch and does all the same things (and a few additional things as well). Use whichever package is easier for you to work with from a coding perspective.
cheers,
doug.
is working on a reply...