Help:Generating documentation

From semantic-mediawiki.org
Jump to: navigation, search
Generating documentation
Generate parameter documentation for a result format
Further Information
Provided by: Semantic MediaWiki
Minimum version: 1.6.0
Maximum version: still supported
Function: yes
Tag: no
Name: #smwdoc
Table of Contents

The parser function #smwdoc allows for automatic parameter documentation generation for all result formats.

Note Note: This documentation also applies to the #mapsdoc parser function which may be used analogous.

Syntax

{{#smwdoc:<format name> | parameters=<criterion> | language=<languagecode> }}

Available values for parameters:

  • parameters: Available criterion are specific, base, all. See the examples listed below to learn about their usage.
  • language: Available codes are specified in ISO 639-1. Note that a translation must be available for the specified code to work.

Examples

Parameter "parameters"

only specific parameters for the respective format are shown
{{#smwdoc:table}}
or
{{#smwdoc:table | parameters=specific }}
Parameter Type Default Description
class text sortable wikitable smwtable An additional CSS class to set for the table
transpose yes/no no Display table headers vertically and results horizontally
sep text empty The separator for values
only basic parameters applicable for all formats are shown
{{#smwdoc:table | parameters=base }}
Parameter Type Default Description
source text empty Alternative query source
limit whole number 50 The maximum number of results to return
offset whole number 0 The offset of the first result
link text all Show values as links
sort list of texts empty Property to sort the query by
order list of texts empty Order of the query sort
headers text show Display the headers/property names
mainlabel text no The label to give to the main page name
intro text empty The text to display before the query results, if there are any
outro text empty The text to display after the query results, if there are any
searchlabel text ... further results Text for continuing the search
default text empty The text to display if there are no query results
basic parameters applicable for all formats and specific parameters for the respective format are shown
{{#smwdoc:table | parameters=all }}
Parameter Type Default Description
source text empty Alternative query source
limit whole number 50 The maximum number of results to return
offset whole number 0 The offset of the first result
link text all Show values as links
sort list of texts empty Property to sort the query by
order list of texts empty Order of the query sort
headers text show Display the headers/property names
mainlabel text no The label to give to the main page name
intro text empty The text to display before the query results, if there are any
outro text empty The text to display after the query results, if there are any
searchlabel text ... further results Text for continuing the search
default text empty The text to display if there are no query results
class text sortable wikitable smwtable An additional CSS class to set for the table
transpose yes/no no Display table headers vertically and results horizontally
sep text empty The separator for values

Parameter "language"

{{#smwdoc:table|language=nl}}
Parameter Type Standaard Beschrijving
class tekst sortable wikitable smwtable Een extra CSS-klasse om in te stellen voor de tabel
transpose ja / nee no Tabelkoppen verticaal en resultaten horizontaal weergeven
sep tekst leeg Het scheidingsteken voor waarden


This documentation page applies to all SMW versions from 1.7.1 to the most current version.
Other versions: 1.6.0 – 1.7.0      

Help:Generating documentation en 1.7.1