Editing
Template:If then show/doc
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Usage == ; {{q|P26}} for {{q|Q151973}} : <syntaxhighlight lang="wikitext" inline>{{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q151973|fwd=ALL|osd=no}}|unmarried}}</syntaxhighlight> β {{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q151973|fwd=ALL|osd=no}}|unmarried}} ; {{q|P26}} for {{q|Q905}} : <syntaxhighlight lang="wikitext" inline>{{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q905|fwd=ALL|osd=no}}|unmarried}}</syntaxhighlight> β {{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q905|fwd=ALL|osd=no}}|unmarried}} === Prefix and suffix === ==== Infobox field with microformat ==== A value in an infobox can be designed to be wrapped in a microformat if the wikidata call is not empty: : <syntaxhighlight lang="wikitext" inline>{{if then show | {{#invoke:WikidataIB | getValue | rank=best |P19 |name=birth_place |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|}}} |noicon={{{noicon|}}} | {{{birth_place|}}} }} || <span class="birthplace"> | </span>}}</syntaxhighlight> : If there is a local parameter supplied in the article (e.g. {{para|birth_place|London}}), the code will return <code><nowiki><span class="birthplace">London</span></nowiki></code>. : If there is no local parameter it will attempt to fetch a value for {{q|P19}} from Wikidata. : If that has a value, such as "New York", the code will return <code><nowiki><span class="birthplace">New York</span></nowiki></code>. : If there is no value returned from Wikidata, the code returns nothing. ==== Table ==== A table can be designed to display a row only when a particular property of the article exists on Wikidata. ; {{q|P26}} for {{q|Q151973}} : <syntaxhighlight lang="wikitext"> {| class="wikitable" |- ! scope="col" style="width:15em;" | Label ! scope="col" style="width:36em;" | Value {{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q151973|fwd=ALL|osd=no}}||<tr><th>{{#invoke:WikidataIB|getLabel|P26|qid=Q151973}}</th><td>|</td></tr>}} |} </syntaxhighlight> : β {| class="wikitable" |- ! scope="col" style="width:15em;" | Label ! scope="col" style="width:36em;" | Value {{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q151973|fwd=ALL|osd=no}}||<tr><th>{{#invoke:WikidataIB|getLabel|P26|qid=Q151973}}</th><td>|</td></tr>}} |} ; {{q|P26}} for {{q|Q905}} : <syntaxhighlight lang="wikitext"> {| class="wikitable" |- ! scope="col" style="width:15em;" | Label ! scope="col" style="width:36em;" | Value {{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q905|fwd=ALL|osd=no}}||<tr><th>{{#invoke:WikidataIB|getLabel|P26|qid=Q905}}</th><td>|</td></tr>}} |} </syntaxhighlight> : β {| class="wikitable" |- ! scope="col" style="width:15em;" | Label ! scope="col" style="width:36em;" | Value {{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q905|fwd=ALL|osd=no}}||<tr><th>{{#invoke:WikidataIB|getLabel|P26|qid=Q905}}</th><td>|</td></tr>}} |}
Summary:
Please note that all contributions to Eurovision Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Eurovision Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Tools
What links here
Related changes
Page information