Difference between revisions of "Template:Version"
From ApCoCoAWiki
Andraschko (talk | contribs) (Added documentation and categories and fixed bug not removing {{{2}}} if the variable is not assigned) |
Andraschko (talk | contribs) m (no category link in template page) |
||
Line 1: | Line 1: | ||
<includeonly>{{#switch: {{{1|}}} | <includeonly>{{#switch: {{{1|}}} | ||
− | | 1 = <!-- Case: version is 1.0 --> [[Category:ApCoCoA-1]] | + | | 1 = <!-- Case: version is 1.0 --> {{#if {{{NOCATEGORY|}}} || [[Category:ApCoCoA-1]] }} |
{{{!}} cellspacing="8" cellpadding="0" style="background-color:#eeffee; width:100%; font-size:95%; border-bottom: 2px solid green; border-top: 2px solid green; position:top; clear:both;" | {{{!}} cellspacing="8" cellpadding="0" style="background-color:#eeffee; width:100%; font-size:95%; border-bottom: 2px solid green; border-top: 2px solid green; position:top; clear:both;" | ||
{{!}} {{#if: {{{2|}}} | <!-- Case: Link is given --> | {{!}} {{#if: {{{2|}}} | <!-- Case: Link is given --> | ||
Line 8: | Line 8: | ||
}} | }} | ||
{{!}}} | {{!}}} | ||
− | | 2 = <!-- Case: version is 2.0 --> [[Category:ApCoCoA- | + | | 2 = <!-- Case: version is 2.0 --> {{#if {{{NOCATEGORY|}}} || [[Category:ApCoCoA-1]] }} |
{{{!}} cellspacing="8" cellpadding="0" style="background-color:#eeeeff; width:100%; font-size:95%; border-bottom: 2px solid blue; border-top: 2px solid blue; position:top; clear:both;" | {{{!}} cellspacing="8" cellpadding="0" style="background-color:#eeeeff; width:100%; font-size:95%; border-bottom: 2px solid blue; border-top: 2px solid blue; position:top; clear:both;" | ||
{{!}} {{#if: {{{2|}}} | <!-- Case: Link is given --> | {{!}} {{#if: {{{2|}}} | <!-- Case: Link is given --> | ||
Line 30: | Line 30: | ||
{{Version|1}} | {{Version|1}} | ||
</pre> | </pre> | ||
− | {{Version|1}} | + | {{Version|1|NOCATEGORY=true}} |
Line 36: | Line 36: | ||
{{Version|2}} | {{Version|2}} | ||
</pre> | </pre> | ||
− | {{Version|2}} | + | {{Version|2|NOCATEGORY=true}} |
Line 42: | Line 42: | ||
{{Version|1|[[SB.IsInSubalgebra]]}} | {{Version|1|[[SB.IsInSubalgebra]]}} | ||
</pre> | </pre> | ||
− | {{Version|1|[[SB.IsInSubalgebra]]}} | + | {{Version|1|[[SB.IsInSubalgebra]]|NOCATEGORY=true}} |
Line 48: | Line 48: | ||
{{Version|2|[[ApCoCoA-1:SB.IsInSubalgebra]]}} | {{Version|2|[[ApCoCoA-1:SB.IsInSubalgebra]]}} | ||
</pre> | </pre> | ||
− | {{Version|2|[[ApCoCoA-1:SB.IsInSubalgebra]]}} | + | {{Version|2|[[ApCoCoA-1:SB.IsInSubalgebra]]|NOCATEGORY=true}} |
</noinclude> | </noinclude> |
Revision as of 12:12, 3 October 2020
This template can be used to mark the version of an article concerning a function.
Syntax
{{Version|<<version number>>}} {{Version|<<version number>>|<<article in other version>>}}
Here <<version number>>
is either 1
for the old version ApCoCoA-1.0 or 2
for ApCoCoA-2.0 and <<article in other version>>
is an optional argument containing a link to the corresponding article in the other version.
Examples
{{Version|1}}
{{#if true || }}
This article is about a function from ApCoCoA-1.0. |
{{Version|2}}
{{#if true || }}
This article is about a function from ApCoCoA-2.0. |
{{Version|1|[[SB.IsInSubalgebra]]}}
{{#if true || }}
This article is about a function from ApCoCoA-1.0. If you are looking for the ApCoCoA-2.0 version of it, see SB.IsInSubalgebra. |
{{Version|2|[[ApCoCoA-1:SB.IsInSubalgebra]]}}
{{#if true || }}
This article is about a function from ApCoCoA-2.0. If you are looking for the ApCoCoA-1.0 version of it, see ApCoCoA-1:SB.IsInSubalgebra. |