Content deleted Content added
Fix wording and naming of things. Not "namespace" but "subject space" for non-talkpages. |
Explaining the "page" parameter. |
||
Line 30:
| main =
| default = Text for all other talkspaces
}}
</pre>
=== The "page" parameter ===
For testing and demonstration purposes this template can take a parameter named '''page'''. Like this:
<pre>
{{talkspace detect
| user = User talk text.
| default = Any talk page text.
| page = User talk:Example
}}
</pre>
No matter on what kind of page the code above is used it will return this:
:{{talkspace detect
| user = User talk text.
| default = Any talk page text.
| page = User talk:Example
}}
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:
<pre>
{{talkspace detect
| user = User talk text.
| default = Any talk page text.
| page = {{{page|}}}
}}
</pre>
|