Aus SubmersWiki

Wechseln zu: Navigation, Suche

Autocomplete can be used on:

  • All the values of a specific property, add autocomplete on property=property-name to the field definition.
  • The names of all pages in a category, add autocomplete on category=category-name
  • The names of all pages in a namespace, add autocomplete on namespace=namespace-name

If you want use autocomplete based on the values in an external URL, which lets you get autocompletion values from any external system, you should:

  1. Create a page/web service that takes in a substring via the query string, and displays a set of autocompletion values; the values should be in JSON format, and look like the JSON returned by the MediaWiki API, this also makes it easy to autocomplete on the values from another wiki.
  2. Decide on a short string to represent this URL.
  3. Add a line to LocalSettings.php: $sfgAutocompletionURLs['URL-identifier-string'] = 'URL';
  4. Add the parameter autocomplete from url=URL-identifier-string to the relevant field in the form definition.
  • Disable autocompletion, if it's enabled by default for a field, by adding the parameter "no autocomplete" to the field's definition.





Diese Seite wurde zuletzt am 25. November 2010 um 16:01 Uhr geändert.Diese Seite wurde bisher 1.329-mal abgerufen.