Difference between revisions of "Template:Sclass/core"
Jump to navigation
Jump to search
blackwiki>The Earwig m (Protected "Template:Sclass/core": Highly visible template: nearly 20,000 mainspace transclusions ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))) |
blackwiki>Trappist the monk (categorize pages using sclass & sclass2 that link to redirect pages;) |
||
| Line 13: | Line 13: | ||
|6 ={{#ifeq: {{{format}}} |sclass|-class {{{2}}}]] |]] {{red|'''ERROR:''' invalid option {{{3}}}}}}} | |6 ={{#ifeq: {{{format}}} |sclass|-class {{{2}}}]] |]] {{red|'''ERROR:''' invalid option {{{3}}}}}}} | ||
|]] {{red|'''ERROR:''' invalid option {{{3}}}}} | |]] {{red|'''ERROR:''' invalid option {{{3}}}}} | ||
| − | }} | -class]] [[{{#if:{{{4|}}}|{{{2}}} ({{{4}}}){{!}}{{{2}}}|{{{2}}}}}]] }}</includeonly><noinclude> | + | }} | -class]] [[{{#if:{{{4|}}}|{{{2}}} ({{{4}}}){{!}}{{{2}}}|{{{2}}}}}]] }} {{#switch:{{{format}}} |
| + | |sclass = {{#ifeq:{{#invoke:Redirect|isRedirect|{{{1}}} class {{{2}}}}}|yes| | ||
| + | {{#if:{{#invoke:String|match|s={{#invoke:Redirect|main|{{{1}}} class {{{2}}}}} |pattern={{{1}}}%-class |plain=false |nomatch=}}|[[Category:WPSHIPS: sclass redirect]]}}}} | ||
| + | |sclass2 = {{#ifeq:{{#invoke:Redirect|isRedirect|{{{1}}} class {{{2}}}}}|yes| | ||
| + | {{#if:{{#invoke:String|match|s={{#invoke:Redirect|main|{{{1}}} class {{{2}}}}} |pattern={{{1}}}%-class |plain=false |nomatch=}}|[[Category:WPSHIPS: sclass2 redirect]]}}}}}}</includeonly><noinclude> | ||
{{documentation}} | {{documentation}} | ||
<!-- Add categories and interwikis to the /doc subpage, not here! --> | <!-- Add categories and interwikis to the /doc subpage, not here! --> | ||
</noinclude> | </noinclude> | ||