Help:Property links

From semantic-mediawiki.org

Property links, i.e. linking to property pages can be achieved with regular links, e. g. [[Property:Population]] creates the link Property:Population. Since Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x. there is an easier way to achieve this using a "no-value annotation". This way a link to a property page can be created that is independent of the language setting.

Creating property links with wiki-text in templates (e.g. for semantic infoboxes or forms) require some additional work, if they are to display tooltips with auto-property descriptions, or to change their preferred label based on user language. For that reason, the special syntax [[Foo::@@@]] was introduced in Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x.1 to generate a full featured property link for "Foo" property. The tooltips can also be used without actually creating a link 2.

Examples[edit]

Syntax
[[Population::@@@]]
Result

PopulationThe number of inhabitants of some geographical place.


Syntax
[[Population::@@@|People]]
Result

PeopleThe number of inhabitants of some geographical place.


Syntax (showing a tooltip without linking)
[[Population::@@@|#]]
Result

PopulationThe number of inhabitants of some geographical place.


More examples

Demonstration of property links

Note[edit]

If the SMW_DV_MLTV_LCODE flag is removed from configuration parameter $smwgDVFeaturesSets the available features regarding property data values, property links will no longer render as tooltips.3 Instead they will appear as plain links to the property.


References

  1. ^  Semantic MediaWiki: GitHub issue gh:smw:1855
  2. ^ gh:smw:4042 
  3. ^  Semantic MediaWiki: GitHub issue gh:smw:3562