[BUGFIX] Jump Links in indexed_search Template
[Packages/TYPO3.CMS.git] / typo3 / sysext / indexed_search / Resources / Private / Templates / Search / Search.html
1 <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:is="http://typo3.org/ns/TYPO3/CMS/IndexedSearch/ViewHelpers" data-namespace-typo3-fluid="true">
2 <f:alias map="{sword: searchParams.sword}">
3 <f:render partial="Form" arguments="{_all}" />
4 </f:alias>
5 <f:for each="{resultsets}" as="result">
6 <f:if condition="{result.categoryTitle}">
7 <h1 class="tx-indexedsearch-category">{result.categoryTitle}</h1>
8 </f:if>
9 <!-- show the info what was searched for -->
10 <f:for each="{searchWords}" as="searchWord" key="key">
11 <f:if condition="{key} > 0">
12 <f:then>
13 <f:translate key="searchFor.{searchWord.oper}" />&nbsp;{searchWord.sword}
14 </f:then>
15 <f:else>
16 <f:translate key="searchFor" />&nbsp;{searchWord.sword}
17 </f:else>
18 </f:if>
19 </f:for>
20 <!-- show the info in which section was searched for -->
21 {result.searchedInSectionInfo}
22 <f:if condition="{result.count} > 0">
23 <f:then>
24 <div class="tx-indexedsearch-browsebox">
25 <p>
26 <is:pageBrowsingResults numberOfResults="{result.count}" currentPage="{searchParams.pointer}" resultsPerPage="{searchParams.numberOfResults}" />
27 {result.sectionText}
28 </p>
29 <!-- render the anchor-links to the sections inside the displayed result rows -->
30 <f:if condition="{result.affectedSections}">
31 <div class="tx-indexedsearch-sectionlinks">
32 <table cellpadding="0" cellspacing="0" border="0" summary="Result links">
33 <f:for each="{result.affectedSections}" as="sectionData" key="sectionId">
34 <tr>
35 <td width="100%">--&gt;&nbsp;
36 <f:link.page section="anchor_{sectionId}" addQueryString="1" noCacheHash="1"
37 argumentsToBeExcludedFromQueryString="{0: 'id'}">
38 <f:if condition="{sectionData.0}">
39 <f:then>{sectionData.0}</f:then>
40 <f:else><f:translate key="unnamedSection" /></f:else>
41 </f:if>
42 &nbsp;({sectionData.1}&nbsp;<f:translate key="{f:if(condition: '{sectionData.1} > 1', then: 'result.pages', else: 'result.page')}" />)
43 </f:link.page>
44 </td>
45 </tr>
46 </f:for>
47 </table>
48 </div>
49 </f:if>
50 <is:pageBrowsing maximumNumberOfResultPages="{settings.page_links}" numberOfResults="{result.count}" currentPage="{searchParams.pointer}" resultsPerPage="{searchParams.numberOfResults}" />
51 </div>
52 <f:for each="{result.rows}" as="row">
53 <f:if condition="{row.isSectionHeader}">
54 <f:then>
55 <div id="anchor_{row.sectionId}" class="tx-indexedsearch-sectionhead">
56 <h2 class="tx-indexedsearch-title"><f:format.html>{row.sectionTitle}</f:format.html> <span class="tx-indexedsearch-result-count">{row.numResultRows} <f:translate key="{f:if(condition: '{row.numResultRows} > 1', then: 'result.pages', else: 'result.page')}" /></span></h2>
57 </div>
58 </f:then>
59 <f:else>
60 <f:render partial="Searchresult" arguments="{row: row}" />
61 </f:else>
62 </f:if>
63 </f:for>
64 <div class="tx-indexedsearch-browsebox">
65 <is:pageBrowsing numberOfResults="{result.count}" maximumNumberOfResultPages="{settings.page_links}" currentPage="{searchParams.pointer}" resultsPerPage="{searchParams.numberOfResults}" />
66 </div>
67 </f:then>
68 <f:else>
69 <f:translate key="result.noResult" />
70 </f:else>
71 </f:if>
72 </f:for>
73 </html>