Template:Talkspace detect: Difference between revisions

Content deleted Content added
Add draft talk namespace
Copying from sandbox: (1) support missing namespaces MOS talk, TimedText talk and Event talk, (2) fix broken subst support for subject spaces, and (3) avoid unnecessary use of Template:^ when <noinclude> tags work just fine.
 
(4 intermediate revisions by 4 users not shown)
Line 1:
{{safesubst<noinclude/>:#switch:
{{safesubst<noinclude/>:#if:{{{page|}}}
| {{safesubst<noinclude/>:#ifeq:{{safesubst:<noinclude/>NAMESPACE:{{{page}}} }}|{{safesubst:<noinclude/>SUBJECTSPACE:{{{page}}} }}
| anysubject
| {{safesubst:<noinclude/>TALKSPACE:{{{page}}} }}
}}
| {{safesubst<noinclude/>:#ifeq:{{safesubst:<noinclude/>NAMESPACE}}|{{safesubst:<noinclude/>SUBJECTSPACE}}
| anysubject
| {{safesubst:<noinclude/>TALKSPACE}}
}}
}}
<noinclude><!-- Only one of the lines below will be executed.
Respecting empty parameters on purpose. --></noinclude>
| anysubject = {{{other|}}} <noinclude><!--Any subject space--></noinclude>
| Talk = {{{main| {{{default|}}} }}}
| User talk = {{{user| {{{default|}}} }}}
Line 22:
| Category talk = {{{category| {{{default|}}} }}}
| Portal talk = {{{portal| {{{default|}}} }}}
| BookDraft talk = {{{bookdraft| {{{default|}}} }}}
| ModuleMOS talk = {{{modulemos| {{{default|}}} }}}
| DraftTimedText talk = {{{drafttimedtext| {{{default|}}} }}}
| #default Module talk = {{{module| {{{default|}}} <!--A new talk space-->}}}
| Event talk = {{{event| {{{default|}}} }}}
| #default = {{{default|}}} <noinclude><!--A new talk space--></noinclude>
}}<noinclude>
 
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, notinterwikis go to Wikidata, thank hereyou! -->
</noinclude>