Template:Namespace and pagename-detecting templates: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Set theorist adding matching entries from {{namespace detect see also}} |
meta>Funandtrvl organize |
||
Line 5: | Line 5: | ||
* {{tl|if pagename}} – For pattern matching on the pagename. | * {{tl|if pagename}} – For pattern matching on the pagename. | ||
* {{tl|if pagename multi}} – For pattern matching on the pagename, has input reuse. | * {{tl|if pagename multi}} – For pattern matching on the pagename, has input reuse. | ||
* {{tl|IP-talk}} – Return: 1) IP user talk page 2) registered user talk page 3) not user talk page. | |||
* {{tl|IP-user other}} – For detecting IP-user pages. | * {{tl|IP-user other}} – For detecting IP-user pages. | ||
Easy to use namespace-detection templates: | Easy to use namespace-detection templates: | ||
Line 12: | Line 12: | ||
* {{tl|main other}} – For article templates. | * {{tl|main other}} – For article templates. | ||
* {{tl|talk other}} – For talk page templates. | * {{tl|talk other}} – For talk page templates. | ||
* {{tl| | * {{tl|book other}} – For detecting book pages. | ||
* {{tl| | * {{tl|category other}} – For category templates. | ||
* {{tl|file other}} – For file (image) templates. | * {{tl|file other}} – For file (image) templates. | ||
* {{tl|help other}} – For help page templates. | * {{tl|help other}} – For help page templates. | ||
* {{tl|portal other}} – For portal templates. | * {{tl|portal other}} – For portal templates. | ||
* {{tl| | * {{tl|template other}} – For detecting template pages. | ||
* {{tl|user other}} – For user page templates. | |||
* {{tl|wikipedia other}} – For detecting "Wikipedia:" pages. | |||
More complex namespace-detection templates: | More complex namespace-detection templates: | ||
Line 25: | Line 25: | ||
* {{tl|namespace detect}} – The very versatile one. | * {{tl|namespace detect}} – The very versatile one. | ||
* {{tl|namespace detect showall}} – The extremely versatile one, has input reuse. | * {{tl|namespace detect showall}} – The extremely versatile one, has input reuse. | ||
* {{tl| | * {{tl|main talk category other}} – Separates some namespaces. | ||
* {{tl|main talk other}} – Separates some namespaces. | * {{tl|main talk other}} – Separates some namespaces. | ||
* {{tl| | * {{tl|talkspace detect}} – For detecting talk pages on various namespaces. | ||
Technical stuff: | Technical stuff: | ||
Line 34: | Line 34: | ||
* [[mw:Help:Magic words]] – About <code><nowiki>{{NAMESPACE}}</nowiki></code> etc. | * [[mw:Help:Magic words]] – About <code><nowiki>{{NAMESPACE}}</nowiki></code> etc. | ||
* [[mw:Help:Extension:ParserFunctions]] – About <code><nowiki>{{#ifeq:|||}}</nowiki></code> etc.<noinclude> | * [[mw:Help:Extension:ParserFunctions]] – About <code><nowiki>{{#ifeq:|||}}</nowiki></code> etc.<noinclude> | ||
{{Documentation}} | |||
{{ | <!--Please add this template's categories to the /doc subpage, not here - thanks!--> | ||
<!-- | |||
</noinclude> | </noinclude> |
Revision as of 15:20, 2 September 2014
Pagename-handling and detection templates:
- {{basepage subpage}} – For detecting if on a basepage, subpage or subsubpage.
- {{pgn}} – Can take apart and put together pagenames in several ways.
- {{if pagename}} – For pattern matching on the pagename.
- {{if pagename multi}} – For pattern matching on the pagename, has input reuse.
- {{IP-talk}} – Return: 1) IP user talk page 2) registered user talk page 3) not user talk page.
- {{IP-user other}} – For detecting IP-user pages.
Easy to use namespace-detection templates:
- {{main other}} – For article templates.
- {{talk other}} – For talk page templates.
- {{book other}} – For detecting book pages.
- {{category other}} – For category templates.
- {{file other}} – For file (image) templates.
- {{help other}} – For help page templates.
- {{portal other}} – For portal templates.
- {{template other}} – For detecting template pages.
- {{user other}} – For user page templates.
- {{wikipedia other}} – For detecting "Wikipedia:" pages.
More complex namespace-detection templates:
- {{namespace detect}} – The very versatile one.
- {{namespace detect showall}} – The extremely versatile one, has input reuse.
- {{main talk category other}} – Separates some namespaces.
- {{main talk other}} – Separates some namespaces.
- {{talkspace detect}} – For detecting talk pages on various namespaces.
Technical stuff:
- Wikipedia:Namespace – Lists all the namespaces.
- mw:Help:Magic words – About
{{NAMESPACE}}
etc. - mw:Help:Extension:ParserFunctions – About
{{#ifeq:|||}}
etc.