diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2016-02-12 17:04:42 +0100 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2016-02-12 17:04:42 +0100 |
| commit | a23efd3bfd8de4bdf8085ea0e39e7abd4f84f516 (patch) | |
| tree | cb3af6435bec575d522bbe66b8e5406b4c5b1b5d /data/templates/opensearch.htm | |
| parent | cb78e8dbc0351660d0c5c15be2a7b9b969ad9dbe (diff) | |
| download | phinde-a23efd3bfd8de4bdf8085ea0e39e7abd4f84f516.tar.gz phinde-a23efd3bfd8de4bdf8085ea0e39e7abd4f84f516.zip | |
opensearch paging
Diffstat (limited to 'data/templates/opensearch.htm')
| -rw-r--r-- | data/templates/opensearch.htm | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/data/templates/opensearch.htm b/data/templates/opensearch.htm index a1000f1..1ba805a 100644 --- a/data/templates/opensearch.htm +++ b/data/templates/opensearch.htm @@ -1,11 +1,26 @@ <?xml version="1.0" encoding="UTF-8"?> -<feed xmlns="http://www.w3.org/2005/Atom" +<feed xmlns="http://www.w3.org/2005/Atom" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"> - <title>"{{query}}" search results</title> + <title>"{{query}}" search results</title> <link rel="self" href="{{fullUrl}}" type="application/atom+xml"/> + {% set fullUrls = pager.getFullUrls() %} + {% if fullUrls.first %} + <link rel="first" href="{{fullUrls.first}}" type="application/atom+xml"/> + {% endif %} + {% if fullUrls.prev %} + <link rel="prev" href="{{fullUrls.prev}}" type="application/atom+xml"/> + {% endif %} + {% if fullUrls.next %} + <link rel="next" href="{{fullUrls.next}}" type="application/atom+xml"/> + {% endif %} + {% if fullUrls.last %} + <link rel="last" href="{{fullUrls.last}}" type="application/atom+xml"/> + {% endif %} + <updated>{{"now"|date("c")}}</updated> <id>{{fullUrl}}</id> <opensearch:totalResults>{{hitcount}}</opensearch:totalResults> + <opensearch:itemsPerPage>10</opensearch:itemsPerPage> {% for hit in hits %} {% set doc = hit._source %} <entry> |
