opensearch support
[phinde.git] / data / templates / opensearch.htm
1 <?xml version="1.0" encoding="UTF-8"?>
2 <feed xmlns="http://www.w3.org/2005/Atom" 
3       xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
4   <title>"{{query}}" search results</title> 
5   <link rel="self" href="{{fullUrl}}" type="application/atom+xml"/>
6   <updated>{{"now"|date("c")}}</updated>
7   <id>{{fullUrl}}</id>
8   <opensearch:totalResults>{{hitcount}}</opensearch:totalResults>
9   {% for hit in hits %}
10     {% set doc = hit._source %}
11     <entry>
12      <title>{{doc.title}}</title>
13      <link href="{{doc.url}}"/>
14      <id>{{doc.url}}</id>
15      {% if doc.modate %}
16      <updated>{{doc.modate|date('c')}}</updated>
17      {% endif %}
18      <content type="text">{{doc.htmlText|striptags}}</content>
19     </entry>
20   {% endfor %}
21 </feed>