X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=blobdiff_plain;f=examples%2Fhtdocs%2Fmkws-widget-ru.readme;fp=examples%2Fhtdocs%2Fmkws-widget-ru.readme;h=0000000000000000000000000000000000000000;hp=4dc8c4be3c3c8c250eb5d131e8c97af0947e6cc8;hb=9b8279ad5b907e03ad4b38ec88b4756a79911aa8;hpb=e1244766fb767d08b59e71f8af82a0eeceb6c976 diff --git a/examples/htdocs/mkws-widget-ru.readme b/examples/htdocs/mkws-widget-ru.readme deleted file mode 100644 index 4dc8c4b..0000000 --- a/examples/htdocs/mkws-widget-ru.readme +++ /dev/null @@ -1,37 +0,0 @@ -# Embedding Reference Universe with MKWS - -## Quick start -Simply paste this inline with the markup on any page: - - - - -
- -## A bit more detail - -The MasterKey Widget Set ([MKWS](http://mkws.indexdata.com/)) lets you easily embed search-enabled widgets which run in the client browser and display results from a web service. In this case, it searches Reference Universe. - -You need to include the main MKWS scripts. This can be inline as above or you can include it in the header or aggregate it with your application's scripts. - - - -You also need to tell the widget how to authenticate onto the searching service: - - - -The provided stylesheet is generic and you're encouraged to replace it entirely by styling the new elements to fit seamlessly with your content. - - - -Any element you give the class `mkws-reference-universe` will have is contents replaced by the top results from a search against the Reference Universe service for the current query. - -
- -### Finding the query - -The `autosearch` attribute of the widget container lets it know where to find the query. There are three places it might look to find that you're searching for *water*: - -* `!param!foo` indicates a GET parameter and would match `http://site.tld/search?foo=water` -* `!path!2` will take the 2nd path component from the end of the url and would find the query in `http://site.tld/apps/search/water/mobile` -* `!var!foo` will look for the query in a JavaScript variable named `foo` in the `window` context (ie. a top level variable)