Help:Ul format

From Linux Web Expert

Ul format
Outputs results as a bulleted list, with additional outputs shown in parentheses.
Further Information
Provided by: Semantic MediaWiki
Added: 0.7
Removed: still supported
Requirements: none
Format name: ul
Enabled? Indicates whether the result format is enabled by default upon installation of the respective extension. yes
Authors: Markus Krötzsch
Categories: misc
Keywords
list · template
Table of Contents

The result format ul is used to format query results as bulleted lists. It is very similar to result format "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements)., result format "List"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output introduces class attributes to HTML elements to facilitate easy individual styling. and result format "Ol"Outputs results as a numbered list, with additional outputs shown in parentheses..

Parameters

Format specific
⧼validator-describe-header-parameter⧽ ⧼validator-describe-header-aliases⧽ ⧼validator-describe-header-type⧽ ⧼validator-describe-header-default⧽ ⧼validator-describe-header-description⧽
propsep - ⧼validator-type-string⧽ , The separator between the properties of a result entry
valuesep - ⧼validator-type-string⧽ , The separator between the values for a property of a result
template - ⧼validator-type-string⧽ ⧼validator-describe-empty⧽ The name of a template with which to display the printouts
named args namedargs ⧼validator-type-boolean⧽ no Name the arguments passed to the template
userparam - ⧼validator-type-string⧽ ⧼validator-describe-empty⧽ A value passed into each template call, if a template is used
class - ⧼validator-type-string⧽ ⧼validator-describe-empty⧽ An additional CSS class to set for the list
introtemplate - ⧼validator-type-string⧽ ⧼validator-describe-empty⧽ The name of a template to display before the query results, if there are any
outrotemplate - ⧼validator-type-string⧽ ⧼validator-describe-empty⧽ The name of a template to display after the query results, if there are any
prefix - ⧼validator-type-string⧽ none Control display of namespace in printouts
Starting with Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki this result format was overhauled and the following changes were made to the parameters provided:1
  • The "columns" parameter was removed. Use the "class" parameter and CSS instead.
  • The "class" parameter was introduced to allow setting an additional CSS class for the output.
  • The "template arguments" parameter was removed. It served no longer any purpose since the "?" prefix for arguments was removed, too.
  • The "propsep" and the "valuesep" parameter were introduced to supplement the "sep" parameter.

Examples

Standard output

Query
{{#ask:
 [[Category:City]]
 [[Located in::Germany]] 
 |?Population
 |?Area#km²=Size in km²
 |format=ul
}}
Result


Multi-column output

Starting with Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki the "columns" parameter is no longer available.1 Instead the "class" parameter and CSS have to be used to generate two or more columns. CSS in turn allows for even more formatting options.2 The examples shown below provide examples for a two column layout.

Semantic MediaWiki ≥ 3.0.0

Query / individually (preferred)
{{#ask:
 [[Category:City]]
 [[Located in::Germany]] 
 |format=ul
 |class=exampleclass
}}
CSS / individually (preferred)
ul.smw-format.ul-format.exampleclass {
    column-count: 2;
}
Result
It is preferred to use the "class" parameter to allow for a fine-grained control of the columns appearance for individual queries.
Query / globally
{{#ask:
 [[Category:City]]
 [[Located in::Germany]] 
 |format=ul
}}
CSS / globally
ul.smw-format.ul-format {
    column-count: 2;
}
Result
This is discouraged since it does not allow for fine-grained control of the appearance of individual queries using this result format. All queries would be affected by the CSS.

Semantic MediaWiki < 3.0.0

Query
{{#ask:
 [[Category:City]]
 [[Located in::Germany]] 
 |format=ul
 |columns=2
}}
Result

Template:Interlanguagelink: en


References

  1. a b gh:smw:3130 
  2. ^  |  CSS Multiple Columns