Difference between revisions of "Template:Property setting"
From TDWG Terms Wiki
m (#forminput: no autofocus) |
m (+hints on has type: Text) |
||
Line 110: | Line 110: | ||
| Text = {{Hidden | header = [[Has type::{{{has type|}}}]] | toggle text = More… / Hide | content = Type “Text” | | Text = {{Hidden | header = [[Has type::{{{has type|}}}]] | toggle text = More… / Hide | content = Type “Text” | ||
* holds text of arbitrary length | * holds text of arbitrary length | ||
+ | * can be Wiki code (except <nowiki> content) | ||
* can be searched partially: if text is ≤ 72 characters it's all searchable, if text is > 72 characters then only the first 40 characters can be searched | * can be searched partially: if text is ≤ 72 characters it's all searchable, if text is > 72 characters then only the first 40 characters can be searched | ||
* is better set with parser function #set than with {{#tag: nowiki |[[{{PAGENAME}}::long text possibly having […] text ]]}} | * is better set with parser function #set than with {{#tag: nowiki |[[{{PAGENAME}}::long text possibly having […] text ]]}} | ||
Line 128: | Line 129: | ||
| #default = {{Hidden | header = <!-- | | #default = {{Hidden | header = <!-- | ||
− | -->{{#if: {{{has type|}}} | [[Has type::{{{has type|}}}]] | [[Has type:: | + | -->{{#if: {{{has type|}}} | [[Has type::{{{has type|}}}]] | [[Has type::Text]] (is assumed, as no “has type“ is set)}}<!-- end if |
-->| toggle text = More… / Hide | content = See also [[Special:Types|types defined by Semantic MediaWiki]] and [[Special:Properties]] for all properties.}}<!-- | -->| toggle text = More… / Hide | content = See also [[Special:Types|types defined by Semantic MediaWiki]] and [[Special:Properties]] for all properties.}}<!-- | ||
-->}}<!-- switch end | -->}}<!-- switch end | ||
Line 134: | Line 135: | ||
--></tr><!-- | --></tr><!-- | ||
− | subproperty of (do not | + | subproperty of (do not delete it, because property setting may need it although it is set automatically from #ask) |
-->{{#if: {{{subproperty of|{{#var: subproperties}}}}}<!-- | -->{{#if: {{{subproperty of|{{#var: subproperties}}}}}<!-- | ||
then-->|<tr><!-- | then-->|<tr><!-- |
Latest revision as of 14:31, 3 February 2020
[edit] [ ] Template documentation
Template “Property setting” is used to set just basic property settings (hopefully sometime automatically by SMW-#autoedit).
Usage
Parameter in bold are mandatory, all other are optional:
{{Property setting |has type= → mandatory (one of SMW Special:Types, "String" is assumend when no value is given) |has fields= → used when “has type” is “Record” (; separated, e.g.: "property1; property2") |display units= → used when “has type” is “Quantities” (, separated, e.g.: "W, kW") |corresponds to= → used when “has type” is “Quantities” (; separated, e.g.: "1 W, Watt, Watts; 0.001 kW") |imported from= → optional, (uses imported page by MediaWiki:Smw_import_local-ns-prefix, details see Help SMW import vocabulary) |annotations= → optional free text |show value ranks= → "yes" or "no" }}
Uses:
- form: Property setting defined globally for all properties in the project name space “TDWG Terms Wiki“ (see TDWG Terms Wiki:Property)
Sets:
- Class: Imported vocabulary (see also talk page)
- Classes depending on optional parameter “categories”
- Property: rdfs:label
TODO
See talk page.
- add parameter (to have multiple settings possible)?
Technical documentation
Shall the parameter be removed? |imported from → it is set automatically when a page "MediaWiki:Smw_import…" exists
Removed parameter in favour of #ask query|heading=→ use automatically #ask with skos:inScheme|label=→ use automatically #ask with skos:prefLabel|categories=→ can be set manually if needed or TODO set them from #ask|subproperty of=→ set automatically rdfs:subPropertyOf #asked from corresponding Concept page
Dependencies: