Difference between revisions of "Template:Dmbox"

From Moegirlpedia
Jump to: navigation, search
m (rollback)
(attempt to implement functions of "category handler" with "includeAt".)
Line 30: Line 30:
 
   Detect and report usage with faulty "type" parameter:
 
   Detect and report usage with faulty "type" parameter:
 
-->{{#switch:{{{type|}}}
 
-->{{#switch:{{{type|}}}
|  <!-- No type fed, is also valid input -->
+
|  <!-- "No type" is also a valid input -->
 
| disambig
 
| disambig
 
| setindex =    <!-- Do nothing, valid "type" -->
 
| setindex =    <!-- Do nothing, valid "type" -->
| #default = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
+
| #default = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Message box that needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<!--  
+
}}<!--
   Magic word for disambiguation pages:
+
   Magic word for disambiguation pages -->
-->{{#ifeq:{{{type|}}}|disambig|__DISAMBIG__|}}<!--  
+
{{#ifeq:{{{type|}}}|disambig|__DISAMBIG__|}}<!--
   Categorization:
+
   Categorization -->
-->{{#switch:{{{type|}}}
+
{{#switch:{{{type|}}}
 
| setindex =  
 
| setindex =  
   {{category handler
+
   {{IncludeAt
 
   | main = [[Category:All set index articles]]
 
   | main = [[Category:All set index articles]]
   | nocat = {{{nocat|}}}  <!--So "nocat=true" works-->
+
   | noinclude = {{{nocat|}}}  <!--So "nocat=true" works-->
 
   | page = {{{page|}}}  <!--For testing-->
 
   | page = {{{page|}}}  <!--For testing-->
 +
  <!--No categories for any other cases-->
 
   }}
 
   }}
 
| disambig    <!-- disambig = default -->
 
| disambig    <!-- disambig = default -->
 
| #default =  
 
| #default =  
   {{category handler
+
   {{IncludeAt
   | main = [[Category:All article disambiguation pages]][[Category:All disambiguation pages]]
+
  | anytalk = <!-- Don't categorize on talk pages; talk pages are unlikely to need disambiguation -->
   | template =    <!-- Don't categorize on template pages. -->
+
   | user = [[Category:User page with potential template misuse]]<!-- Don't categorize on user pages. -->
 +
  | main = [[Category:Full-page disambiguation pages]]
 +
   | template =    <!-- Don't categorize on template pages -->
 +
  | help = [[Category:All disambiguation pages]]
 +
  | category = [[Category:Disambiguation categories]]
 
   | other = [[Category:All disambiguation pages]]
 
   | other = [[Category:All disambiguation pages]]
   | nocat = {{{nocat|}}}  <!--So "nocat=true" works-->
+
<!--| pagename = {{{pagename|}}}
   | page = {{{page|}}}  <!--For testing-->
+
   | page = {{{page|}}}  Not sure what the original function is, commenting out-->
 +
   | noinclude = {{{nocat|}}}  <!--So "nocat=true" works-->
 
   }}
 
   }}
}}<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>

Revision as of 03:05, 28 August 2019


Template-info.svg Template Documentation  [Create] [Refresh]