diff --git a/templates/OpenSearchDescription.ss b/templates/OpenSearchDescription.ss index 3e11727..c75384e 100644 --- a/templates/OpenSearchDescription.ss +++ b/templates/OpenSearchDescription.ss @@ -6,8 +6,7 @@ <% if Tags %><Tags>$Tags</Tags><% end_if %> <% if Contact %><Contact>$Content</Contact><% end_if %> - <% if SearchPageLink %><Url type="text/html" template="$SearchPageLink" /><% end_if %> - <% if SearchPageRss %><Url type="application/rss+xml" template="$SearchPageRss" /><% end_if %> - <% if SearchPageJson %><Url type="application/x-suggestions+json" template="$SearchPageJson" /><% end_if %> -</OpenSearchDescription> - + <% if SearchPageLink %><Url type="text/html" template="$SearchPageLink"></Url><% end_if %> + <% if SearchPageAtom %><Url type="application/atom+xml" template="$SearchPageAtom"></Url><% end_if %> + <% if SearchPageJson %><Url type="application/x-suggestions+json" template="$SearchPageJson"></Url><% end_if %> +</OpenSearchDescription> \ No newline at end of file diff --git a/templates/OpenSearchResults.ss b/templates/OpenSearchResults.ss index 507f8ce..d73fac4 100644 --- a/templates/OpenSearchResults.ss +++ b/templates/OpenSearchResults.ss @@ -1,23 +1,22 @@ <?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"> - <channel> +<feed xmlns="http://www.w3.org/2005/Atom" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"> + <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> - <link>$Link</link> - - <opensearch:totalResults>$TotalResults</opensearch:totalResults> - <opensearch:startIndex>$StartResult</opensearch:startIndex> - <opensearch:itemsPerPage>$PageLength</opensearch:itemsPerPage> - - <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> \ No newline at end of file + <link href="$Link">$Link</link> + <id>urn:uuid:$ID</id> + <content type="text">$Content.LimitCharacters(200)</content> + </entry> + <% end_control %> +</feed> \ No newline at end of file