Status: | effective |
Progress: | 100% |
Version: | 2.5.0+ |
Help:Property links
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
- https://sandbox.semantic-mediawiki.org/wiki/Issue/1855
- https://sandbox.semantic-mediawiki.org/wiki/Issue/1855_%28Lorem_ipsum%29
- https://sandbox.semantic-mediawiki.org/wiki/Template:Issue/2068
- https://sandbox.semantic-mediawiki.org/wiki/Form:Issue/2068
Note[edit]
If the SMW_DV_MLTV_LCODE
flag is removed from configuration parameter $smwgDVFeatures
Sets 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
- ^ Semantic MediaWiki: GitHub issue gh:smw:1855
- ^ gh:smw:4042
- ^ Semantic MediaWiki: GitHub issue gh:smw:3562