Шаблон:Инвертировать-свойство: различия между версиями
Перейти к навигации
Перейти к поиску
Oreolek (обсуждение | вклад) (Новая страница: «<noinclude> This template takes a property name and its inverse property name. It queries for the inverse property name and produces wiki text with the inverted…») |
Oreolek (обсуждение | вклад) |
||
Строка 4: | Строка 4: | ||
Usage: <nowiki>{{Invert-property|Derived property name|Its inverse property name}}</nowiki> | Usage: <nowiki>{{Invert-property|Derived property name|Its inverse property name}}</nowiki> | ||
− | This hides the annotation by specifying blank as the alternate text. Since "<tt>| </tt>" in a template confuses parsing, it uses a subtemplate [[ | + | This hides the annotation by specifying blank as the alternate text. Since "<tt>| </tt>" in a template confuses parsing, it uses a subtemplate [[Шаблон:Инвертировать-свойство/Сепаратор]] for the separator. |
− | See [ | + | See [https://www.semantic-mediawiki.org/wiki/Demo:California California] for use of this template. |
(Credit goes to Semantic MediaWiki user DanTMan for this technique.) | (Credit goes to Semantic MediaWiki user DanTMan for this technique.) | ||
[[Category:Sample pages]] | [[Category:Sample pages]] | ||
− | </noinclude><includeonly>[[{{{2}}}::{{#ask:[[{{{1}}}::{{PAGENAMEE}}]]|link=none|sep={{ | + | </noinclude><includeonly>[[{{{2}}}::{{#ask:[[{{{1}}}::{{PAGENAMEE}}]]|link=none|sep={{Инвертировать-свойство/Сепаратор|{{{2}}}}}}}| |
]]</includeonly> | ]]</includeonly> |
Версия 19:13, 22 апреля 2017
This template takes a property name and its inverse property name. It queries for the inverse property name and produces wiki text with the inverted annotations.
Usage: {{Invert-property|Derived property name|Its inverse property name}}
This hides the annotation by specifying blank as the alternate text. Since "| " in a template confuses parsing, it uses a subtemplate Шаблон:Инвертировать-свойство/Сепаратор for the separator.
See California for use of this template.
(Credit goes to Semantic MediaWiki user DanTMan for this technique.)