Template:Archivelinks/doc and Template:Archivelinks dpl: Difference between pages

From IxWiki
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
mp>Miekal
m (Protected "Template:Archivelinks dpl" ([edit=autoconfirmed] (expires 01:32, 10 April 2012 (UTC)) [move=autoconfirmed] (expires 01:32, 10 April 2012 (UTC))))
 
Line 1: Line 1:
=== Usage ===
<includeonly>{{#vardefine:path|{{{archivepath|Archive}}}}}{{#vardefine:bef|{{{before|}}}}}{{#vardefine:aft|{{{after|}}}}}{{#vardefine:sep|{{{separator|{{#ifeq:{{{addeditdate|}}}|true||&#44;&#32;}}}}}}}{{#vardefine:bef2|{{#if:{{{intro|}}}|{{{intro}}}{{#ifeq:{{{addeditdate|}}}|true|\n|}}|}}}}{{#ifeq:{{{addeditdate|}}}|true||{{#var:bef2}}}}{{#dpl:
 
|namespace={{NAMESPACEE}}
Put this template <nowiki>{{archivelinks}}</nowiki> on any talk page and it will automatically show links to all existing archive pages (currently up to 10).
|titlematch={{BASEPAGENAME}}/{{#var:path}}%
 
|nottitlematch={{BASEPAGENAME}}/{{#var:path}}_list%
It can also be put on the archive pages themselves, and will show links to the other archives.
|ordermethod=firstedit
 
|{{#ifeq:{{{addeditdate|false}}}|true|mode=userformat|mode=inline}}
The default template (without parameters) will assume that the archives exist at /Archive1, /Archive2, /Archive3 etc. and show like this: [[Main_Page|1]], [[Main_Page|2]], [[Main_Page|3]]
|replaceintitle=/.*{{#var:path}}(.*)/,{{#var:bef}}$1{{#var:aft}}
 
|{{#ifeq:{{{addeditdate|false}}}|true|format={{#var:bef2}},*[[%PAGE%|%TITLE%]] : %DATE%,¶|inlinetext={{#var:sep}}}}
The path to the archive pages and the look of the links can be customised with the template's parameters.
|noresultsheader=&nbsp;
 
|shownamespace=false
 
|allowcachedresults=true
=== Advanced usage: ===
|skipthispage={{{skipthis|yes}}}
 
|addeditdate={{{addeditdate|false}}}
<nowiki>{{archivelinks
|userdateformat=Y-m-d
  | archive path component  (default: 'Archive') the text between the '/' and the numeral in the paths to the archive pages.
}}{{#if:{{{nonewlink|}}}||{{{separator|{{#ifeq:{{{addeditdate|}}}|true||&#44;&#32;}}}}}{{archivenewlink|{{{archivepath|Archive}}}}}}}
  | link before markup      (default: '')        the text that will show before the numeral in archive links
</includeonly><noinclude>
  | link after markup      (default: '')        the text that will show after the numeral in archive links
{{doc}}</noinclude>
  | link separator markup  (default: ', ')      the text that will show between archive links
}}
 
------------------------------------------------------------------------------------------------------------
== Examples ==                   Code:                                    Output:
------------------------------------------------------------------------------------------------------------
if archive pages are at
'/archive1' and '/archive2'      {{archivelinks|archive|Archive #||, }}   Archive #1, Archive #2
------------------------------------------------------------------------------------------------------------
if archive pages are at
'/Archive 1' and 'Archive 2'    {{archivelinks|Archive |{|}| - }}         {1} - {2}
------------------------------------------------------------------------------------------------------------
</nowiki>
=== See also ===
 
<includeonly>
<!-- ADD CATEGORIES HERE -->
[[Category:In-text templates]]
</includeonly>

Revision as of 21:32, 8 April 2012