Not logged in
Talk
Contributions
Log in
Navigation
Main page
Recent changes
Random page
Upload file
Module
Discussion
Edit
View history
Editing
Module:Category handler/doc
(section)
From Body Communication
Jump to:
navigation
,
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!
=== Subpages === The category handler module understands the '''subpage''' parameter. Like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'This is a module used in all namespaces.' local category = categoryHandler{ subpage = 'no' -- Don't categorize on subpages wikipedia = '[[Category:Somecat]]', nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> If "<code>subpage='no'</code>" then this template will ''not'' categorize on subpages. For the rare occasion you ''only'' want to categorize on subpages, then use "<code>subpage='only'</code>". If '''subpage''' is empty or undefined then this template categorizes both on basepages and on subpages.
Summary:
Please note that all contributions to Body Communication are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (see
Body Communication:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, 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.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Tools
What links here
Related changes
Special pages
Page information