[BUGFIX] Highlight searchwords in indexed_search results 09/49809/2
authorFrans Saris <franssaris@gmail.com>
Wed, 31 Aug 2016 19:47:21 +0000 (21:47 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 2 Sep 2016 22:35:40 +0000 (00:35 +0200)
The old default settings of indexed search was to highlighted the
search word(s) by default and show the matching parts of the results.

This patch brings back this default behaviour and fixed the output
formatting.

Resolves: #77682
Releases: master, 7.6
Change-Id: Ie281bb4c030194d57a55120e84fe43d2aa55e79f
Reviewed-on: https://review.typo3.org/49809
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/indexed_search/Configuration/TypoScript/setup.txt
typo3/sysext/indexed_search/Resources/Private/Partials/Searchresult.html

index 30270be..c1a6a8c 100644 (file)
@@ -104,6 +104,7 @@ plugin.tx_indexedsearch {
                        languageUid = -1
                        sortDesc = 1
                        searchType = 1
+                       extResume = 1
                }
 
        }
index bc76490..83cc45a 100644 (file)
@@ -1,8 +1,13 @@
 <div class="tx-indexedsearch-res">
-       <f:format.html><h3><span class="tx-indexedsearch-icon">{row.icon}</span> <f:if condition="{settings.displayResultNumber}"><span class="tx-indexedsearch-result-number">{row.result_number}</span></f:if> <span class="tx-indexedsearch-title{row.CSSsuffix}">{row.title}</span> <span class="tx-indexedsearch-percent">{row.rating}</span></h3></f:format.html>
+       <h3>
+               <span class="tx-indexedsearch-icon">{row.icon -> f:format.raw()}</span>
+               <f:if condition="{settings.displayResultNumber}"><span class="tx-indexedsearch-result-number">{row.result_number}</span></f:if>
+               <span class="tx-indexedsearch-title{row.CSSsuffix}">{row.title -> f:format.raw()}</span>
+               <span class="tx-indexedsearch-percent">{row.rating}</span>
+       </h3>
 
        <f:if condition="{row.headerOnly} == 0">
-       <p class="tx-indexedsearch-description">{row.description}</p>
+       <p class="tx-indexedsearch-description">{row.description -> f:format.raw()}</p>
        <dl class="tx-indexedsearch-info">
                <dt class="tx-indexedsearch-text-item-size"><f:translate key="result.size" />&nbsp;</dt>
                <dd class="tx-indexedsearch-text-item-size">{row.size}</dd>
@@ -19,7 +24,7 @@
        </f:if>
 
        <f:if condition="{row.headerOnly} == 1">
-               <p class="tx-indexedsearch-description">{row.description}</p>
+               <p class="tx-indexedsearch-description">{row.description -> f:format.raw()}</p>
        </f:if>
 
        <f:if condition="{row.subresults}">
@@ -29,4 +34,4 @@
                        </f:for>
                </p>
        </f:if>
-</div>
\ No newline at end of file
+</div>