Difference between revisions of "Template:Editnotice"

From Timelines
Jump to: navigation, search
(Fix, was adding Category:Expired editnotice to all edit notices with a blank "expiry" parameter. See Template talk:Editnotice#Incorrect category)
(pass param |redirect (now recognized by notice subtemplate) to suppress category when it equals yes)
 
(3 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
  |{{Editnotice/notice
 
  |{{Editnotice/notice
 
   |expiry={{{expiry|¬}}}
 
   |expiry={{{expiry|¬}}}
 +
  |redirect={{{redirect|}}}
 
  }}
 
  }}
 
}}{{#ifexpr:{{#ifeq:{{FULLROOTPAGENAME}}|Template:Editnotices
 
}}{{#ifexpr:{{#ifeq:{{FULLROOTPAGENAME}}|Template:Editnotices
Line 19: Line 20:
 
  }}
 
  }}
 
  |{{fmbox
 
  |{{fmbox
   |type      = editnotice
+
   |type      = {{{type|editnotice}}}
 
   |id        = {{{id|}}}
 
   |id        = {{{id|}}}
 
   |textstyle = {{{textstyle|}}}
 
   |textstyle = {{{textstyle|}}}
Line 32: Line 33:
 
   }}
 
   }}
 
   |text      = {{#if:{{{header|}}}
 
   |text      = {{#if:{{{header|}}}
   |<dl><dt style="{{{headerstyle|}}}">{{{header}}}</dt></dl>
+
   |<div style="font-weight: bold; {{{headerstyle|}}}">{{{header}}}</div>
 
   }}
 
   }}
 
{{{text|{{{1}}}}}}
 
{{{text|{{{1}}}}}}
Line 44: Line 45:
 
   |{{#ifexpr:{{#time:U|{{{expiry}}}}}-{{#time:U|{{CURRENTTIMESTAMP}}}}>0
 
   |{{#ifexpr:{{#time:U|{{{expiry}}}}}-{{#time:U|{{CURRENTTIMESTAMP}}}}>0
 
     | <!-- Notice current -->
 
     | <!-- Notice current -->
     |[[Category:Expired editnotice]] <!-- Notice expired -->
+
     |[[Category:Expired editnotices]] <!-- Notice expired -->
 
   }}
 
   }}
 
   }}
 
   }}

Latest revision as of 06:19, 7 September 2016

Template documentation[create]