summaryrefslogtreecommitdiff
path: root/templates/results.gtpl
diff options
context:
space:
mode:
authornavanchauhan <navanchauhan@gmail.com>2023-01-18 02:41:10 -0700
committernavanchauhan <navanchauhan@gmail.com>2023-01-18 02:41:10 -0700
commit790ca38644b8c37c9feb7c433143a6b49b4f137e (patch)
treef809dc4ef486090648686a4c4769a08034a462d0 /templates/results.gtpl
parent46f32a7dc26dad46ffa974de56bf1541b8578e12 (diff)
added pagination and results per page
Diffstat (limited to 'templates/results.gtpl')
-rw-r--r--templates/results.gtpl6
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/results.gtpl b/templates/results.gtpl
index 151a7d3..ce2b99d 100644
--- a/templates/results.gtpl
+++ b/templates/results.gtpl
@@ -28,9 +28,11 @@
</tr>
{{ end }}
</table>
+ {{if .ShowPrev }}
+ <a href="/classic/search?query={{.OriginalQuery.Query}}&page={{.PrevPage}}&maxHits={{.MaxResults}}"> <p>Previous Page</p></a>
+ {{ end }}
{{ if .MoreResults }}
- <a href="/classic/search?query={{.OriginalQuery.Query}}&offset={{.LastOffset}}"> <p>Previous Page</p></a>
- <a href="/classic/search?query={{.OriginalQuery.Query}}&offset={{.Offset}}"> <p>Next Page</p></a>
+ <a href="/classic/search?query={{.OriginalQuery.Query}}&page={{.PrevPage}}&maxHits={{.MaxResults}}"> <p>Next Page</p></a>
{{ end }}
</body>
</html> \ No newline at end of file