From Joomla! Documentation

This is a documentation subpage for Template:Jversion.
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:Jversion.

The purpose of this template is to evaluate a given version number for use on other templates. The "return value" can either be an integer (>= 10) or a float (m.n).

Integer numbers are used to build template and image names and CSS classes. They are based on the major version multiplied by 10, i.e. "1.0.15" becomes "10", "1.5" becomes "15".

Floating point numbers are based on the major and minor digits of the version-vector given and are primarily used for category names such as [[Category:Joomla! 1.5]].



Example #var:VECTOR #var:VECTORE #var:JMAJOR . #var:JMINOR #var:JVERSION
{{jversion}} gives "Template:Jversion" .
{{jversion|0}} gives "Template:Jversion" .
{{jversion|0.5}} gives "Template:Jversion" .
{{jversion|1}} gives "Template:Jversion" .
{{jversion|1.0.15}} gives "Template:Jversion" .
{{jversion|1.5}} gives "Template:Jversion" .
{{jversion|1.5|}} gives "Template:Jversion" .
{{jversion|1.5.}} gives "Template:Jversion" .
{{jversion|1.5.3}} gives "Template:Jversion" .


Parameter Parameter description req./opt.
{{{1}}} a version number or version vector required
{{{2}}} return format: float (default) or integer; optional

f causes a maintenance digit to vanish, i.e. "1.5.4" becomes "1.5", similar the number "1" becomes "1.0"

i will multiply the version by 10, i.e. "1.5.3" ~ "15" and "1.0.12" ~"10"

Any version number that evaluates to an integer lower than 1 (~ 1.0.0) is considered invalid and an empty string is returned.

See also[edit]