MINOR: changed opensearch output to atom rather than rss

This commit is contained in:
Will Rossiter 2011-02-25 11:32:17 +13:00
parent bb35223fea
commit 0ec206eff5
2 changed files with 24 additions and 26 deletions

View File

@ -6,8 +6,7 @@
<% if Tags %><Tags>$Tags</Tags><% end_if %> <% if Tags %><Tags>$Tags</Tags><% end_if %>
<% if Contact %><Contact>$Content</Contact><% end_if %> <% if Contact %><Contact>$Content</Contact><% end_if %>
<% if SearchPageLink %><Url type="text/html" template="$SearchPageLink" /><% end_if %> <% if SearchPageLink %><Url type="text/html" template="$SearchPageLink"></Url><% end_if %>
<% if SearchPageRss %><Url type="application/rss+xml" template="$SearchPageRss" /><% end_if %> <% if SearchPageAtom %><Url type="application/atom+xml" template="$SearchPageAtom"></Url><% end_if %>
<% if SearchPageJson %><Url type="application/x-suggestions+json" template="$SearchPageJson" /><% end_if %> <% if SearchPageJson %><Url type="application/x-suggestions+json" template="$SearchPageJson"></Url><% end_if %>
</OpenSearchDescription> </OpenSearchDescription>

View File

@ -1,23 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<channel> <title>$Title</title>
<link>$Link</link>
<author>
<name>SilverStripe Ltd.</name>
</author>
<updated>$Now</updated>
<opensearch:totalResults>$TotalResults</opensearch:totalResults>
<opensearch:startIndex>$StartResult</opensearch:startIndex>
<opensearch:itemsPerPage>$PageLength</opensearch:itemsPerPage>
<opensearch:Query role="request" searchTerms="$Query" startIndex="$StartResult" count="$PageLength"></opensearch:Query>
<% control Results %>
<entry>
<title>$Title</title> <title>$Title</title>
<link>$Link</link> <link href="$Link">$Link</link>
<id>urn:uuid:$ID</id>
<opensearch:totalResults>$TotalResults</opensearch:totalResults> <content type="text">$Content.LimitCharacters(200)</content>
<opensearch:startIndex>$StartResult</opensearch:startIndex> </entry>
<opensearch:itemsPerPage>$PageLength</opensearch:itemsPerPage> <% end_control %>
</feed>
<atom:link rel="search" type="application/opensearchdescription+xml" href="{$BaseHref}DocumentationSearch/opensearch"/>
<opensearch:Query role="request" searchTerms="$Query" startPage="1" />
<% control Results %>
<item>
<title>$Title</title>
<link>$Link</link>
<description>$Content.LimitCharacters(200)</description>
</item>
<% end_control %>
</channel>
</rss>