X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Fmkws-manual.markdown;h=ef54044e2313aeed74b6a008144934cddf0e28e9;hb=22c49596b24a5e05c9940e17546b7e2b67eb1fc7;hp=64fee059d9ef15247fe4ed14bfe68b6692051070;hpb=18d58d798acc34e27713bb3245072e2ecaeeb1e6;p=mkws-moved-to-github.git diff --git a/doc/mkws-manual.markdown b/doc/mkws-manual.markdown index 64fee05..ef54044 100644 --- a/doc/mkws-manual.markdown +++ b/doc/mkws-manual.markdown @@ -51,7 +51,7 @@ MKWS classes in any HTML page, the various components of an application can be embedded: search-boxes, results areas, target information, etc. -Simple Example +Simple example ============== The following is @@ -99,7 +99,7 @@ and provide the components of the searching UI. The very simple application above has only two such widgets: a search box and a results area. But more are supported. -Defining Widget Elements +Defining widget elements ======================== Widget type @@ -128,10 +128,10 @@ The main widgets are: * `mkws-switch` -- provides links to switch between a view of the result records and of the targets that provide them. Only - meaningful when `mkwsTargets` is also provided. + meaningful when `mkws-targets` is also provided. * `mkws-targets` -- the area where per-target information will appear - when selected by the link in the `mkwsSwitch` area. Of interest + when selected by the link in the `mkws-switch` area. Of interest mostly for fault diagnosis rather than for end-users. * `mkws-lang` -- provides links to switch between one of several @@ -186,8 +186,11 @@ compatibility. However, **these old class-names are deprecated, and support will be removed in v2.0**. Existing applications that use them should be upgraded to the new-style class names as soon as convenient. -Configuration -============= +Configuring widgets +=================== + +Global configuration +-------------------- Many aspects of the behaviour of MKWS can be modified by setting parameters into the `mkws_config` object. So the HTML header looks @@ -195,6 +198,7 @@ like this: -This configuration sets the UI language to Danish (rather than the -default of English), initially sorts search results by title rather -than relevance (though as always this can be changed in the UI) and -makes the search box a bit wider than the default. +This configuration restricts the set of available UI languages English +and Danish (omitting German), sets the default to Danish (rather than +the English), initially sorts search results by title rather than +relevance (though as always this can be changed in the UI) and makes +the search box a bit wider than the default. The full set of supported configuration items is described in the reference guide below. +Per-widget configuration +------------------------ + +In addition to the global configuration provided by the `mkws_config` +object, individual widgets' behaviour can be configured by providing +configuration items as attributed on their HTML elements. For example, +a `records` widget might be restricted to displaying no more than +three records by setting the `numrecs` parameter as follows: + +