![]() |
Download TeamPage 6.2 | ![]() |
com.traction.sdk.util.SearchResultHighlighter class has been split into multiple parts. SearchResultHighlighter is now an interface with a much simpler API, and the default implementation is in com.traction.sdk.util.StandardSearchResultHighlighter .truncate tag has been modified to include support for a token-sensitive version of the usual truncation behavior. This is intended to be used in place of the snippet tag when token-sensitive truncation is required and there's no text search hit highlighting to be performed. (Server89641)com.traction.sdk.search.Document implementations -- com.traction.sdk.Entry , File and Attachment -- now support getter and setter methods for setting and retrieving the com.traction.sdk.search.SearchResult that was used to load it, when applicable, and also providing direct access to the snippet HTML provided by that SearchResult, when available. The SearchResult interface now contains the methods getSnippetHtml() and getSnippetText() that return the snippet in HTML or text format, and the searchresult.document.snippethtml or searchresult.document.snippettext SDL tags can be used to render these values in an SDL template.entry.snippet tag can be used to retrieve a snippet for the currently scoped com.traction.sdk.Entry . By default, this will either be a snippet generated by TeamPage using the user's preferred snippet size setting (or that of the current skin, if applicable), or the that came from the external search engine result which caused the Entry to be loaded. To generate a snippet from the match com.traction.sdk.Item s of the current Entry using parameters of their own choosing, SDL designers can specify much the same attributes that the snippet SDL tag supports.snippet, truncate and entry.snippet tags now all support the inputFormat=, outputFormat= and collapseWhitespace= attributes. The accepted values for inputFormat= and outputFormat= are "html", "text_only" and "text_only_with_entities". These govern, respectively, what transformation will be applied to the input in order to turn it into pure text, and what transformation will be applied to the output to make it suitable for the desired context. collapseWhitespace= may be set to "true" or "false" to indicate whether the text-only version of the input should have all runs of one or more whitespace characters collapsed to a single ordinary space character, which can often be desirable.