Difference between revisions of "Template:Latest"

From DoomWiki.org

m
m (Format date using #time function)
Line 1: Line 1:
<includeonly>[[{{{1}}}{{#if:{{{2|}}}|{{!}}{{{2}}}}}]]||{{:{{{1}}}/Version}}||{{:{{{1}}}/Date}}</includeonly><noinclude>This template expects to be given a single parameter corresponding to the name of a source port. It returns a link to this source port, followed by the latest version and the latest release date. (Optionally, a second parameter can be given to use as the displayed name in the link.) To work correctly, the port's article should have a /Version and a /Date subpages containing these informations. This template is meant to be used in a table, such as the one in [[Comparison of Doom source ports]].[[Category:Templates]]</noinclude>
+
<includeonly>[[{{{1}}}{{#if:{{{2|}}}|{{!}}{{{2}}}}}]]||{{:{{{1}}}/Version}}||{{#iferror:{{#time:Y-m-d|{{:{{{1}}}/Date}}}}}}</includeonly><noinclude>
 +
==Documentation==
 +
This template expects to be given a single parameter corresponding to the name of a source port. It returns a link to this source port, followed by the latest version and the latest release date. (Optionally, a second parameter can be given to use as the displayed name in the link.) To work correctly, the port's article should have a /Version and a /Date subpages containing these informations. This template is meant to be used in a table, such as the one in [[Comparison of Doom source ports]].
 +
 
 +
[[Category:Templates]]
 +
</noinclude>

Revision as of 19:53, 23 August 2016

Documentation

This template expects to be given a single parameter corresponding to the name of a source port. It returns a link to this source port, followed by the latest version and the latest release date. (Optionally, a second parameter can be given to use as the displayed name in the link.) To work correctly, the port's article should have a /Version and a /Date subpages containing these informations. This template is meant to be used in a table, such as the one in Comparison of Doom source ports.