ଛାଞ୍ଚ:Talkspace detect
This is the {{talkspace detect}} meta-template. It helps other templates detect what type of page they are on. It detects and groups all the different talkspaces used on Wikipedia into several types:
UsageThis template takes one or more parameters named after the different page types as listed above. Like this: {{talkspace detect | main = Article talk page text | user = User talk page text | default = Text for all other talkspaces | other = Text for all subject spaces }} By using an empty parameter you can make it so this template doesn't render anything for some specific page type. Like this: {{talkspace detect | main = | default = Text for all other talkspaces }} The "page" parameterFor testing and demonstration purposes this template can take a parameter named page. Like this: {{talkspace detect | user = User talk text. | default = Any talk page text. | page = User talk:Example }} No matter on what kind of page the code above is used it will return this:
The page parameter makes this template behave exactly as if on that page. The pagename doesn't have to be an existing page. If the page parameter is empty or undefined, the name of the current page determines the result. You can make it so your template also understands the page parameter. That means you can demonstrate the different appearances of your template in the documentation for your template. Then do like this: {{talkspace detect | user = User talk text. | default = Any talk page text. | page = {{{page|}}} }} See alsoEasy to use namespace-detection templates:
More complex namespace-detection templates:
Pagename-handling and detection templates:
Technical stuff:
|
Portal di Ensiklopedia Dunia