Help:Adding subobjects 1.7.0 - 1.7.1

Help:Adding subobjects 1.7.0 - 1.7.1Adding subobjects 1.7.0 - 1.7.1/zh-hans

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

Help:Adding subobjects en 1.7.0 1.7.1

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
  1. 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 Extension "Semantic Internal Objects" (SIO) extension into SMW. The pages containing values set with this parser function are stored with special property Has subobject.


{{#subobject:street address
| street number=10
| street name=Parks Road
| postcode=OX1 3QD
| city=Oxford
| country=UK


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[edit]