Content deleted Content added
Christian75 (talk | contribs) Update high-risk |
m →When not to use this module: fix syntax |
||
Line 10:
For cases where a module only needs to categorise in one of the namespaces main (articles), file (images) or category, then using this module is overkill. Instead, you can simply get a title object using [[rev:https://www.mediawiki.org/wiki/Extension:Scribunto/Lua reference manual#mw.title.getCurrentTitle#mw.title.getCurrentTitle|mw.title.getCurrentTitle]] and check the <code>nsText</code> field. For example:
<source lang="lua">
local title = mw.title.getCurrentTitle()
if title.nsText == 'File' then
-- do something
|