wet_opensearch: Add OpenSearch to a Textpattern powered site

10. Februar 2007

OpenSearch auto discovery in FirefoxAdding a Firefox search provider discovered by its OpenSearch template

wet_opensearch is a plugin for Textpattern which adds an OpenSearch template to your site as specified by the OpenSearch specification.

Additionally, it contains a tag which renders the necessary markup allowing search clients like modern browsers to discover your on-site search facility. Visitors can easily add the site search to their browser’s list of search providers.


Place this tag somewhere into the <head>...</head> element of your site to add an OpenSearch auto discovery link:

<txp:wet_opensearch_link />

In case your Textpattern site search is not handled by the “default” section and its page template, you’d have to specify the URL of the search section, starting at your Textpattern root folder (omit any leading slash):

<txp:wet_opensearch_link searchurl="search" />

Finally, there are two attributes supporting branding. One is used to specify a 16 × 16 pixel icon, while the other designates a 64 × 64 pixels PNG avatar (though I’m not really sure where this will be visible…). The specs say a browser would expect a fully qualified URL here, and so does this plugin.

<txp:wet_opensearch_link favicon="http://www.example.com/myicon.ico" avatar="http://www.example.com/smiley.png" />

Required attributes


Optional attributes

attribute description default
searchurl A path starting at your site’s Textpattern root which displays search results.
If your site uses the default section to list search term hits, leave this empty.
If you employ a special section like /search/ to display search hits, enter the search section’s URL without a leading slash (i.e. “search/”).
favicon The URL of a 16 × 16 pixel icon for your site. http://www.example.com/ {txp-root}/favicon.ico
avatar The URL of a 64 × 64 pixel PNG image for your site. None


This plug-in is released under the Gnu General Public Licence.


Get it here: wet_opensearch.txt.

Resources and Relateds

Express your suggestions, report bugs and discuss enhancements in this thread in the Textpattern forum.


This plugin was inspired by DeWitt Clinton’s post Add OpenSearch to your site in five minutes.

Change log

Date Version Notes
2007-02-10 0.1 Initial public release


  1. Tolles Plug-In für mein Selbstmanagement. Ping!