OpenWGA 7.4 - WebTML reference

WebTML tags » query

<tml:query highlight ="true | false">

Purpose:

Only valid for type="lucene". Activates or deactivates the highlighting of query results.

Description:

For Lucene queries it is possible to highlight the query terms automatically in the search results. For each user only one query can be highlighted at a time. Highlighting always refers to the last query of the user with highlight="true".

The highlighting of query terms is done by the output of the tag <tml:item> and can be controlled by the attributes "highlightprefix" and "highlightsuffix".

If highlighting of a specific query is not necessary anymore the query should be removed by calling "removeLuceneQuery()".

Default value:

false

Examples:

<tml:query type="lucene" db="website" highlight="true">
    OpenWGA
</tml:query>

<tml:foreach>
    <tml:item name="body"
        highlight="true"
        highlightprefix="<span style='background-color:#FFFFCC'>"
        highlightsuffix="</span>"/>

    <hr>
</tml:foreach>