
| Line: 1 to 1 | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Search Results PaginationWhen a%SEARCH{...}% returns many results, you may want to paginate the results. | |||||||||||||||||||||
| Line: 18 to 18 | |||||||||||||||||||||
| limit="" footer="$percntCALCULATE{$SET(ntopics, $tntopics)$SET(nwebs, $nwebs)}$percnt" }% | |||||||||||||||||||||
| Changed: | |||||||||||||||||||||
| < < | |||||||||||||||||||||
| > > | |||||||||||||||||||||
| ... This tweaking adds pagination link rows before and after the search results as follows: | |||||||||||||||||||||
| Changed: | |||||||||||||||||||||
| < < | «Prev 1 2 3 4 5 Next» | ||||||||||||||||||||
| > > | «Previous 1 2 3 4 5 Next» | ||||||||||||||||||||
The section="preamble" and section="postamble" also support a style="" parameter to set the style of the pagination link row <div> tag. For example, to disable the pagination link row on top, write:%INCLUDE{"%SYSTEMWEB%.SearchResultsPagination" section="preamble" style="display:none;"}%<nop> | |||||||||||||||||||||
| Line: 45 to 45 | |||||||||||||||||||||
(The second line is inserted.)
%INCLUDE{"%SYSTEMWEB%.SearchResultsPagination" section="preamble"}%<nop> | |||||||||||||||||||||
| Changed: | |||||||||||||||||||||
| < < | %SEARCH{ | ||||||||||||||||||||
| > > | %SEARCH{... | ||||||||||||||||||||
If you specify limit=20 URL parameter manually, that's observed.
If you specify limit=all URL parameter, all results are shown without pagination. | |||||||||||||||||||||
| Added: | |||||||||||||||||||||
| > > | Where in the topic you go afer clicking a pagination linkBy default, clicking a pagination link leads you to the top of the current set of search results. In other words, you see "«Previous 1 2 3 4 5 Next»" at the top of the web browser window followed by search results. If a topic has little other than search results, you may prefer seeing the top of the page after clicking pagination link. You can achieve that by the following lines.
%INCLUDE{"%SYSTEMWEB%.SearchResultsPagination" section="preamble"}%<nop>
%CALCULATE{$SET(plinkanchor, )}%<nop>
%SEARCH{...
I cannot imagine a real use but if you want to see the bottom of the search results after clicking a pagination link, put the following lines on the topic.
%INCLUDE{"%SYSTEMWEB%.SearchResultsPagination" section="preamble"}%<nop>
%CALCULATE{$SET(plinkanchor, #SearchPaginationBottom)}%<nop>
%SEARCH{...
| ||||||||||||||||||||
URL parametersAll hyper links in the pagination apparatus point to the same page with some URL parameters. | |||||||||||||||||||||
| Line: 84 to 104 | |||||||||||||||||||||
Revision 12013-02-13 - TWikiContributor
View topic | History: r2 < r1 | More topic actions... Ideas, requests, problems regarding TWiki? Send feedback Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.SearchResultsPagination. | |||||||||||||||||||||