Help:Adding subobjects 1.7.0 - 1.7.1

From Linux Web Expert

Revision as of 18:51, 30 July 2012 by >Kghbln (http://semantic-mediawiki.org/w/index.php?title=Help:Adding_subobjects&oldid=19672)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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.

This documentation page applies to all SMW versions from 1.7.0 to 1.7.1.
      Other languages: DeZh-hans


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