Difference between revisions of "Template:Dates/Documentation"

From EncyclopAtys

Jump to: navigation, search
m
(Example)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Usage ==
+
= Description =
  
The '''template ''{{BASEPAGENAME}}''''' is used to display (normally at the beginning of the page) a chronological navigation palette, '''When the page name is a year'''
+
The template '''{{BASEPAGENAME}}''', with no parameters, is used '''''only in pages whose name is a date''''', it
 +
allows you to display (normally at the beginning of the page) a chronological navigation palette.
  
== Syntax ==
+
= Usage =
 +
 
 +
<nowiki>{{Dates}}</nowiki>
 +
 
 +
= Parameters =
 +
* "None
 +
= Example =
 +
 
 +
If the page name is [[2481]]
 +
<nowiki>{{Dates}}</nowiki>
 +
::should result in:
 +
 
 +
{| align=center style="border-style:solid;border-width:1px;border-color:#111111;background-color:#FFEFD4; margin:1em; padding:0 .5em; border: #099 medium outset;border-radius:.5em;background: linear-gradient(to right, #fee , #efe, #eef);"
 +
||{{#ifexist: {{#expr:2481-9}} | '''[[{{#expr:2481-9}}]]''' | {{small|{{#expr:2481-8}} }} }}
 +
||{{#ifexist: {{#expr:2481-8}} | '''[[{{#expr:2481-8}}]]''' | {{small|{{#expr:2481-8}} }} }}
 +
||{{#ifexist: {{#expr:2481-7}} | '''[[{{#expr:2481-7}}]]''' | {{small|{{#expr:2481-7}} }} }}
 +
||{{#ifexist: {{#expr:2481-6}} | '''[[{{#expr:2481-6}}]]''' | {{small|{{#expr:2481-6}} }} }}
 +
||{{#ifexist: {{#expr:2481-5}} | '''[[{{#expr:2481-5}}]]''' | {{small|{{#expr:2481-5}} }} }}
 +
||{{#ifexist: {{#expr:2481-4}} | '''[[{{#expr:2481-4}}]]''' | {{small|{{#expr:2481-4}} }} }}
 +
||{{#ifexist: {{#expr:2481-3}} | '''[[{{#expr:2481-3}}]]''' | {{small|{{#expr:2481-3}} }} }}
 +
||{{#ifexist: {{#expr:2481-2}} | '''[[{{#expr:2481-2}}]]''' | {{small|{{#expr:2481-2}} }} }}
 +
||{{#ifexist: {{#expr:2481-1}} | '''[[{{#expr:2481-1}}]]''' | {{small|{{#expr:2481-1}} }} }}
 +
||{{#ifexist: {{#expr:2481-0}} | '''[[{{#expr:2481-0}}]]''' | {{small|{{#expr:2481-0}} }} }}
 +
||{{#ifexist: {{#expr:2481+1}} | '''[[{{#expr:2481+1}}]]''' | {{small|{{#expr:2481+1}} }} }}
 +
||{{#ifexist: {{#expr:2481+2}} | '''[[{{#expr:2481+2}}]]''' | {{small|{{#expr:2481+2}} }} }}
 +
||{{#ifexist: {{#expr:2481+3}} | '''[[{{#expr:2481+3}}]]''' | {{small|{{#expr:2481+3}} }} }}
 +
||{{#ifexist: {{#expr:2481+4}} | '''[[{{#expr:2481+4}}]]''' | {{small|{{#expr:2481+4}} }} }}
 +
||{{#ifexist: {{#expr:2481+5}} | '''[[{{#expr:2481+5}}]]''' | {{small|{{#expr:2481+5}} }} }}
 +
||{{#ifexist: {{#expr:2481+6}} | '''[[{{#expr:2481+6}}]]''' | {{small|{{#expr:2481+6}} }} }}
 +
||{{#ifexist: {{#expr:2481+7}} | '''[[{{#expr:2481+7}}]]''' | {{small|{{#expr:2481+7}} }} }}
 +
||{{#ifexist: {{#expr:2481+8}} | '''[[{{#expr:2481+8}}]]''' | {{small|{{#expr:2481+8}} }} }}
 +
||{{#ifexist: {{#expr:2481+9}} | '''[[{{#expr:2481+9}}]]''' | {{small|{{#expr:2481+9}} }} }}
 +
|}
 +
 
 +
If the page name is not a number we get:
 +
{{Dates}}
  
<nowiki>{{</nowiki>{{BASEPAGENAME}}
 
|type
 
}}
 
== Paramètres ==
 
* <code>type</code> :
 
== Exemple ==
 
<nowiki>{{Dates|194||avant 1940 |après 1950}}</nowiki>
 
...
 
<pre>
 
...
 
</pre>
 
  
== Voir aussi ==
 
  
 
<noinclude>
 
<noinclude>
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 16:32, 4 July 2019

Description

The template Dates, with no parameters, is used only in pages whose name is a date, it allows you to display (normally at the beginning of the page) a chronological navigation palette.

Usage

{{Dates}}

Parameters

  • "None

Example

If the page name is 2481

{{Dates}}
should result in:
2473 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490

If the page name is not a number we get:

Error: the pagename is not a number