Difference between revisions of "Template:Dated maintenance category"

From Betting Wiki
Jump to navigation Jump to search
en>Rich Farmbrough
(Created page with '{{#if:{{NAMESPACE}}||{{#if:{{{3|}}}|[[Category:{{{1}}} {{{2}}} {{{3}}}]]{{#ifexist:Category:{{{1}}} {{{2}}} {{{3}}}||[[Category:Articles with invalid date parameter…')
 
m (22 revisions imported)
 
(21 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{#if:{{NAMESPACE}}||{{#if:{{{3|}}}|[[Category:{{{1}}} {{{2}}} {{{3}}}]]{{#ifexist:Category:{{{1}}} {{{2}}} {{{3}}}||[[Category:Articles with invalid date parameter in template]]}}|}}|[[Category:{{{1}}}]]}}{{#if:{{{4|}}}|[[Category:{{{4}}}]]}}}}<noinclude>
+
<nowiki/><!--This nowiki helps to prevent whitespace at the top of articles-->{{#ifeq:{{FULLROOTPAGENAME}}|Wikipedia:Template messages|<!--Do not categorize-->|<!--
*This adds a category or dated category to an article space page only.
+
-->{{#ifexpr:{{#if:{{NAMESPACE}}|0|1}}+{{#ifeq:{{{onlyarticles|no}}}|yes|0|1}}
*It will add it to an optional additional category.
+
|{{#if:{{{3|}}}
*If the dated cat is invalid it will add it to [[:Category:Articles with invalid date parameter in template]]
+
  |[[Category:{{{1}}} {{{2}}} {{{3}}}]]<!--
 
+
-->{{#ifexist:Category:{{{1}}} {{{2}}} {{{3}}}
Syntax
+
    |<!--
 
+
-->|[[Category:Articles with invalid date parameter in template]]<!--
*Parameter 1: Default category name
+
-->}}
*Parameter 2: Preposition (from, since, as at, as of)
+
  |[[Category:{{#if:{{{5|}}}
*Parameter 3: Date (Month Year, e.g. {{{CURRENTMONTHNAME}} {{CURRENTYEAR}}) usually the "date" parameter of the calling template
+
              |{{{5}}}<!--
*Parameter 4: All inclusive category name - e.g. All articles containing weasel words
+
            -->|{{{1}}}<!--
*Parameter 5: Alternative default category (overrides 1 which is then only used to construct the dated category if it exists)
+
          -->}}]]<!--
 
+
-->}}{{#if:{{{4|}}}
==Note==
+
      |[[Category:{{{4}}}]]}}<!--
Even if the constructed dated category doesn't exist it is still used. This enables more rapid fault finding.
+
  -->}}<!--
 
+
-->}}<noinclude>
==See also==
+
{{documentation}}
{{Tl|DMC}}
 
 
</noinclude>
 
</noinclude>

Latest revision as of 01:25, 10 September 2019

{{#ifeq:{{ safesubst:#if:

 | {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Dated maintenance category}}|1}}
 | {{ safesubst:#if:|{{{1}}}|Template:Dated maintenance category}}

}}|Wikipedia:Template messages||{{#ifexpr:{{#if:Template|0|1}}+{{#ifeq:no|yes|0|1}}

|{{#if:
 |[[Category:{{{1}}} {{{2}}} {{{3}}}]]{{#ifexist:Category:{{{1}}} {{{2}}} {{{3}}}
   ||}}
 |[[Category:{{#if:
              |{{{5}}}|{{{1}}}}}]]}}{{#if:
     |[[Category:{{{4}}}]]}}}}}}
50px Template documentation[create]