Module:Wikidata table and Module:Wikidata table/sandbox: Difference between pages
(Difference between pages)
imported>MSGJ +sort key |
imported>MSGJ update listed refs |
||
| Line 681: | Line 681: | ||
end | end | ||
end | end | ||
local base_page = current_page.subpageText=='sandbox' and current_page. | local base_page = current_page.subpageText=='sandbox' and current_page.basePageTitle.fullText or current_page.fullText | ||
local out = {'This template will retrieve certain data from [[Wikidata]] for use in a table in an article. ' | local out = {'This template will retrieve certain data from [[Wikidata]] for use in a table in an article. ' | ||
.. 'It is a wrapper template for [[Module:Wikidata table]] function <i>makerow</i>, using predefined properties.\n\n' | .. 'It is a wrapper template for [[Module:Wikidata table]] function <i>makerow</i>, using predefined properties.\n\n' | ||
| Line 738: | Line 738: | ||
table.insert(out, | table.insert(out, | ||
(article and '[['..article..']] and any other ' or 'any ') | (article and '[['..article..']] and any other ' or 'any ') | ||
.. 'article using it. ([[Special:WhatLinksHere/' .. | .. 'article using it. ([[Special:WhatLinksHere/' .. base_page .. '|Search]])\n' | ||
.. '<h3>Overriding columns</h3>' | .. '<h3>Overriding columns</h3>' | ||
.. 'It is possible to override or append to data values obtained from Wikidata in any column in the table.\n' | .. 'It is possible to override or append to data values obtained from Wikidata in any column in the table.\n' | ||
| Line 747: | Line 747: | ||
.. '<h3>Add named reference</h3>' | .. '<h3>Add named reference</h3>' | ||
.. 'If you [[Help:List-defined references|define references in a list]] then you can cite one of these by using the parameter <code>refname</code>. This will add a reference to column 1 directly after the label.\n' | .. 'If you [[Help:List-defined references|define references in a list]] then you can cite one of these by using the parameter <code>refname</code>. This will add a reference to column 1 directly after the label.\n' | ||
.. 'For example you can define a reference called Smith1 by using <pre> | .. 'For example you can define a reference called Smith1 by using <pre><references>\n<ref name="Smith1">reference</ref>\n</references></pre>\n' | ||
.. "Then use <code>refname=Smith1</code>" | .. "Then use <code>refname=Smith1</code>" | ||
.. (qid and '<h3>References</h3>'..mw.getCurrentFrame():expandTemplate{title='Reflist'} or '') | .. (qid and '<h3>References</h3>'..mw.getCurrentFrame():expandTemplate{title='Reflist'} or '') | ||