Help:Adding subobjects 1.7.0 - 1.7.1
Property "Namespace" has a restricted application area and cannot be used as annotation property by a user.Property "Docinfo editor" (as page type) with input value "User:>Kghbln" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.
Adding subobjects 1.7.0 - 1.7.1 | |
---|---|
Set a sub object to a page | |
Further Information | |
Provided by: | Semantic MediaWiki |
Minimum version: | 1.7.0 |
Maximum version: | still supported |
Function: | yes |
Tag: | no |
Name: | #subobject
|
Table of Contents | |
The parser function #subobject allows SMW annotations to refer to objects that have their own property-value pairs just like wiki pages, but that do not actually have a page in the wiki. This can be used to "group" property-value pairs given on one page without requiring new auxiliary pages to be created. It also integrates the main functionality of the Semantic Internal Objects (SIO) extension into SMW. The pages containing values set with this parser function are stored with special property Has subobject.
Syntax
{{#subobject:street address
| street number=10
| street name=Parks Road
| postcode=OX1 3QD
| city=Oxford
| country=UK
}}
Tip
Using several #subobject
data declarations within the same page can cause whitespace to appear in the article. This can be avoided by wrapping the declaration into a div-element:
<div style="display:none;">{{#subobject: ...}} ... {{#subobject: ...}}</div>
External links
- Request for Comments (RFC) on this parser function on the SMW developer mailing list (semediawiki-devel)