Difference between revisions of "Template:EditOnWikidata"

From blackwiki
Jump to navigation Jump to search
imported>JJMC89
(add metadata class since these navigation links are not part of the article)
imported>Mike Peel
(switch to WikidataIB per talk page)
 
Line 2: Line 2:
 
  | no =  
 
  | no =  
 
  | false =  
 
  | false =  
  | #default = <div class="metadata" style="text-align: right;">&#91;[[d:{{#if:{{{qid|}}}|{{{qid}}}|{{#invoke:Wikidata|pageId}}}}|edit on Wikidata]]]</div>
+
  | #default = <div class="metadata" style="text-align: right;">&#91;[[d:{{#if:{{{qid|}}}|{{{qid}}}|{{#invoke:WikidataIB|pageId}}}}|edit on Wikidata]]]</div>
 
}}<noinclude>
 
}}<noinclude>
 
{{Documentation}}</noinclude>
 
{{Documentation}}</noinclude>

Latest revision as of 08:12, 20 December 2019

Template documentation[view] [edit] [history] [purge]

Template to add "edit on Wikidata" tag in Wikidata-driven infoboxes

If the infobox passes a |noicon= parameter, then this link will not be displayed when noicon is set to false or no.

The default can be set at the infobox level by coding as either:

  • | data100 = {{EditOnWikidata|noicon={{{noicon|true}}}}} → which displays the link in an article when noicon is omitted
  • | data100 = {{EditOnWikidata|noicon={{{noicon|false}}}}} → which suppresses the link in an article when noicon is omitted

This functionality is the opposite to the noicon parameter of Module:WikidataIB - so if you set noicon=True and pass it to both the module and this template, you will only see this template. If you pass noicon=False, this template will be hidden while Script error: No such module "EditAtWikidata". will show next to the items fetched from Wikidata in the infobox.

You can specify qid= to link to a specific Wikidata ID if needed (i.e., in page drafts).

Usage

Code Result
{{EditOnWikidata}}
{{EditOnWikidata|noicon=true}}
{{EditOnWikidata|noicon=yes}}
{{EditOnWikidata|noicon=false}}
{{EditOnWikidata|noicon=no}}


See also