Version/tutor/doc
From Joomla! Documentation
< Template:Version | tutor
Alternate Usage[edit]
For standard Joomla! Documenation Articles, use {{version}} which makes an article reference. This template will replace the article reference with a Tutorial reference.
{{version/tutor|1.5}}
The following below shows standard usage, just add /tutor. For example, replace {{version|1.5}} template calls with {{version/tutor|1.5}}
It contains usage information, categories and other content that is not part of the original template page.
To view the template page itself, see Template:Version/tutor.
Usage[edit]
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:
- Tutorial Version notice
- From Version notice
- Until Version notice
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[edit]
Use the following code as the very top and first part of an article to place a version notice.
{{version|2.5}}
{{version|1.6,1.7,2.5}}
{{version|platform=11.1,11.2}}
{{version|1.6,1.7,2.5|platform=11.1,11.2}}
{{version|1.6,1.7,2.5|alt=1.5|altlink=:Category:Joomla! Version 1.5|alttitle=Joomla! 1.5 Category}}
Parameters[edit]
Parameter | Parameter description | Example | req./opt. |
---|---|---|---|
{{{1}}} | Joomla! CMS Version(s) | 2.5 or 1.6,1.7,2.5 (an array) | required or must use platform= |
platform= | Joomla! Platform Version(s) | platform=11.1 or platform=11.2,11.3 | required or must use {{{1}}} |
alt= | Alternate Version(s), can be CMS or Platform | alt=1.5, alt=1.7,2.5 (an array) or alt=11.2,11.3 | optional (must also use altlink) |
altlink= | Alternate Version's Link to Article | altlink=Joomla! 1.5 | optional (must also use alt) |
alttitle= | Alternate Version's Link to Article's Title | alttitle=a must read! | optional |
Usage Issues[edit]
- 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[edit]
- 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>