Help:Special property Display units

From semantic-mediawiki.org
Jump to: navigation, search
Display units
Specifies the a comma-separated list of units or formats that a property should use in display
Further Information
Provided by: Semantic MediaWiki
Added: 1.0
Removed: still in use
Alias: Display unit
Is optional: no
Label: not specified
In this wiki: Property:Display units

The Display units property is a special property in Semantic MediaWiki with a built-in meaning: it specifies the a comma-separated list of units or formats that a property should use in display. In English the name display unit is an alias for this property.

When used on property pages of datatype "Quantity", "Temperature" or "Number" the effect is that all printouts will show the values only in the given units, and only in their given order. If a property does not specify any display units, then it will appear converted into all units supported by its type. You can add this special property to a property page to limit the display, or to control the unit name used (e.g. display "mins" instead of "minutes"). The additional unit conversions appear in the tooltip, the factbox and some search results.

Note that even if you limit the display of units, you can still specify a property value using any unit that the underlying type supports or that was defined with the special property "Corresponds to".

For example, the page for a "Has wattage" property might contain:

[[Display units::kW]]

Thus all values annoted with this property on page Watt will be displayed in "kW".

See the property page Display units to see which pages use this special property on this wiki.



This documentation page applies to all SMW versions from 1.6.0 to the most current version.
Other versions: 1.0 – 1.5.6       Other languages: dezh-hans

Help:Special property Display units en 1.6.0