Contents

To discuss this template as a whole, please see JDOC:WTP. If you wish to discuss general wordings, rather than the wording or formatting of this specific template, don't post here, or else what you say will probably go unnoticed.

Usage

This template will place a bar across the top of a wiki page noting the version and alternate versions with a link specifically for Articles. Other Version Templates:

See Parameters for all available parameters. This template also uses the Arrays Extension, which allows multiple variables separated by commas. If you are having problems or you notice any bugs, please post a notice on the talk page of this template, or the author's talk page.

Examples

Use the following code as the very top and first part of an article to place a version notice.

{{version|2.5}}

This article is for Joomla! CMS Version(s)

{{version|1.6,1.7,2.5}}

This article is for Joomla! CMS Version(s)

{{version|platform=11.1,11.2}}

This article is for Joomla! Platform Version(s)

{{version|1.6,1.7,2.5|platform=11.1,11.2}}

This article is for Joomla! CMS Version(s) and Joomla! Platform Version(s)

Usage Issues

When use the |alt=(version#), you must use |altlink=(a link). The template checks for another page link, before the alternate version icons and the notice is included.

Links to Categories, you must use the : (colon) symbol to create a link to a Category page. The link will actually show as :Category:This article with the :. Recommend use of the alttitle= variable, alttitle=Category;This article will mask the actual link.

Reference

This is the wiki markup used; *NOTE* - comments, line breaks and whitespace must be removed.

<!--Main container-->
<div style="position:relative; left:0px; top:-10px; width:100%; margin-bottom:-20px;" class="metadata" id="version">
<!--Inside containter which holds the actual content of the template-->
<div style="width:auto; border:1px solid #84ABD4; padding:1px 3px 1px 3px; background-color:#B7E2FB;
text-align:center; font-size:1.0em; -moz-border-radius:5px; border-radius:5px; margin-bottom:20px;">
<!--Create the array for the JVer icon template calls from variable(anonymous 1),
it is ok if it doesn't have the anonymous variable, platform= is the backup check,
but one of them must contain a value-->
{{#arraydefine:Vicon|{{{1|}}}}}
<!-- If variable(anonymous 1) contains values, they are the CMS version numbers-->
{{#if:{{{1|}}}|
<!-- Variable 1 has value, process this--><!-- Start of 1st IF true-->
<!-- First, check for altlink(Alternate Link) if yes, print stop_hand icon, no altlink then skip -->
{{#if:{{{altlink|}}}|[[Image:Stop_hand_nuvola.svg.png‎|26px]] |}}
<!-- Start printing the notice -->
This article is for Joomla! CMS Version(s)
<!-- Call the array and print the JVer icons, CMS Versions are default, Platform is backup-->
{{#arrayprint:Vicon| |@@@@|{{JVer|@@@@}} }}
<!-- Call the Platform versions if needed-->
{{#if:{{{platform|}}}|
<!-- Define the Array for Platform for use in the Extras section-->
{{#arraydefine:Picon|{{{platform|}}}}}|}}| <!-- End of first IF - proceeds to Extras section -->
<!-- If the anonymous(Variable 1) was missing... Print the Platform message instead (the 2nd IF)-->
{{#if:{{{platform|}}}|
<!-- Create the array for this alternative Print-->
{{#arraydefine:Picon|{{{platform|}}}}}
<!-- Checking for altlink, print the icon stop_hand-->
{{#if:{{{altlink|}}}|[[Image:Stop_hand_nuvola.svg.png‎|26px]] |}}
<!-- Start printing the Platform notice -->
This article is for Joomla! Platform Version(s)
<!-- Print the Array for icons, then reset it-->
{{#arrayprint:Picon| |@@@@|{{JVer|@@@@}} }}{{#arrayreset:Picon}}| <!--End of 2nd IF-->
<!-- Something is missing, IF 1 fail, IF 2 fail, means(anonymous 1 or platform=)
no value, show an error-->
'''TEMPLATE ERROR - Version(s) Needed. Please Check Usage.'''}}}}
<!--Now the Extras, print a CMS and Joomla Platforms message if relevant,
check for the Alternate Versions and link to the alternate title-->
<!-- Check if there is an Array called Picon with a value-->
{{#if:{{#arraysize:Picon}}|
<!-- Yes, now print it and the Icons otherwise, skip it completely-->
and Joomla! Platform Version(s) {{#arrayprint:Picon| |@@@@|{{JVer|@@@@}}}}{{#arrayreset:Picon}}|}}
<!-- Check for an altlink value-->
{{#if:{{{altlink|}}}|
<!-- Define the alt version Array, note, altlink must have a value or Array creation is skipped-->
{{#arraydefine:Aicon|{{{alt|}}}}}
<!-- Put it all together and print it-->
'''→''' For a {{#arrayprint:Aicon| |@@@@|{{JVer|@@@@}} }} article, see:-
<!-- Create the link from altlink and alttitle-->
'''[[{{{altlink|}}}|{{{alttitle|{{{altlink}}}}}}]]'''
<!-- Clear the Array-->
{{#arrayreset:Aicon}}|}}
<!-- Close the div containers-->
</div></div>