Module:SDcat/doc: Difference between revisions
Appearance
m 1 revision imported |
No edit summary |
||
| Line 1: | Line 1: | ||
== Usage == | == Usage == | ||
; From within a template | ; From within a template | ||
| Line 20: | Line 4: | ||
: or | : or | ||
: <code><nowiki>{{#invoke:SDcat |setCat |sd={{{shortdescription|}}} }}</nowiki></code> | : <code><nowiki>{{#invoke:SDcat |setCat |sd={{{shortdescription|}}} }}</nowiki></code> | ||
; From another module | ; From another module | ||
| Line 29: | Line 12: | ||
<code><nowiki>{{#invoke:SDcat |setCat |qid={{get QID|Douglas Adams}}|sd=English author and humorist (1952–2001) |lp=":"}}</nowiki></code> | <code><nowiki>{{#invoke:SDcat |setCat |qid={{get QID|Douglas Adams}}|sd=English author and humorist (1952–2001) |lp=":"}}</nowiki></code> | ||
A few examples of tests are at | A few examples of tests are at | ||
<includeonly>{{Sandbox other|| | <includeonly>{{Sandbox other|| | ||
}}</includeonly> | }}</includeonly> | ||
<noinclude> | <noinclude> | ||
</noinclude> | </noinclude> | ||
Latest revision as of 02:17, 5 February 2026
Usage
[edit source]- From within a template
{{SDcat |sd={{{shortdescription|}}} }}- or
{{#invoke:SDcat |setCat |sd={{{shortdescription|}}} }}
- From another module
sdcat = require("Module:SDcat")._setCatlocal tracking_cat = sdcat(shortdesc, itemID)
For testing
[edit source]{{#invoke:SDcat |setCat |qid={{get QID|Douglas Adams}}|sd=English author and humorist (1952–2001) |lp=":"}}
A few examples of tests are at