m Date/fix the maintenance tags using AWB |
S (usurped also) (talk | contribs) m clean up, Typos fixed: ionaly → ionally, using AWB |
||
Line 220: | Line 220: | ||
<nowiki>{{{test{{{test|}}}|{{{then}}}}}}</nowiki> |
<nowiki>{{{test{{{test|}}}|{{{then}}}}}}</nowiki> |
||
If '''test''' is empty, we expand the empty '''test''' parameter, but if it contains data, then after trying to expand a non-existing |
If '''test''' is empty, we expand the empty '''test''' parameter, but if it contains data, then after trying to expand a non-existing |
||
'''test''data'''''-parameter, we get the '''then'''-parameter value instead. Or a literal {{{then}}}, if there's |
'''test''data'''''-parameter, we get the '''then'''-parameter value instead. Or a literal {{{then}}}, if there's intentionally |
||
no default value for '''then''', and '''then''' is undefined - a crude mechanism to catch errors. |
no default value for '''then''', and '''then''' is undefined - a crude mechanism to catch errors. |
||
Revision as of 20:00, 2 May 2007
Template:H:h This page is an extension of Help:Template. It concerns template names, variable names, and parameters depending on a variable or parameter. Note: This document refers to features currently only available in 1.6 and later.
Some described applications of these techniques may be outdated because often applying parser functions is better.
A template name or a parameter value depending on a parameter or variable
Both a template name and a parameter value can depend on a parameter or variable:
{{tt|t|efg}}
using Template:Tt containing "{{<includeonly>safesubst:</includeonly>ifsubst|1=|2=<templatestyles src="Mono/styles.css" />}}<span class="monospaced">{{{2|{{{1}}}}}}</span><noinclude>
{{Documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
" and m:Template:T (backlinks ), produces "efg"
{{ {{NAMESPACE}} }}
, using Template:Help containing "<includeonly>*For help with this template, please post a comment on the [[Template_talk:{{ROOTPAGENAME}}|template talk page]] with a {{tl2|reply to}} one or more of the {{history||previous editors}}.</includeonly><noinclude>{{documentation}}</noinclude>
", gives "- For help with this template, please post a comment on the template talk page with a
{{reply to}}
one or more of the previous editors." (spaces needed) - see Template:Histogram
This allows branching depending on variables and parameters. However, using parser functions is more versatile.
Since with the method of this section no conditions such as {{{1}}}<a
can be evaluated, and no substrings can be extracted from strings (not even currently with parser functions), etc., this works best if each parameter and variable has only a limited number of possible values. For example {{CURRENTDAYNAME}}
has only seven possible values, so all cases can be handled with seven templates; if there are really only two cases, five of the seven could be redirects. On the other hand , {{CURRENTTIME}}
has 1440 possible values, so it would be impractical to create a template or even just a redirect for each. Even with parser functions all the 1440 values have to be listed, see m:Template:hour (backlinks ) and m:Template:minute (backlinks ). An older method described below is another possibility, see e.g. m:Template:timedepcolor (backlinks ).
Having multiple parameters, which each can have only few values, is more flexible than having the same total number of possibilities in a single parameter.
If a template depends on PAGENAME, then the many possible values need not be a problem: only the pagenames of the pages that call the template apply, and these can be limited.
Branching according to {{{1}}}=a
or {{{1}}}≠a
is possible, see the section #A parameter name depending on a parameter.
Examples of pages that call a template with a name depending on a variable
- NAMESPACE
- Template:H:h and Template:H:f (see edit pages, MediaWiki help policy, and list)
- Template:Nsn - namespace number (see also below)
- Template:Gns - generic namespace name, useful for linking to the corresponding page on another project
- and (see edit pages and list)
- PAGENAME
- w:en:Template:H:f - for project-specific content on all help pages of the English Wikipedia (requires a blank template on all pages that no not have this content)
A variable name depending on a parameter
Example:
{{namespace|4}}, using Template:Namespace, containing
- {{NAMESPACE:{{{1|}}}}}<includeonly>[[Category:Pages which use a template in place of a magic word|E{{PAGENAME}}]]</includeonly><noinclude>
{{Documentation}}</noinclude>
gives:
A parameter name depending on a parameter
A parameter name in a template call (before "=") can depend on a parameter.
For example, using Template:t pnd containing "[[:Template:T pnd]]
" with Template:t p containing "[[:Template:T p]]
":
*{{t pnd|capital}} *{{t pnd|country}} *{{t pnd|something else}}
gives
This applies also for integer parameter names which normally do not require "=", but are now referred to by an expression on the left of "=".
Furthermore, multiple assignments of values to the same parameter in the same template call are allowed and result in the last value being used.
For example, {{t p|country=Belgium|capital=Paris|country=France}} gives "Template:T p".
- The following is somewhat obsolete on wikis with the ParserFunctions extension, which allows easier branching.
This can be combined into the following branching technique:
{{tts|first parameter, with fixed name = name of template to be called if the parameter names are not equal | second parameter, with the name depending on parameters and/or variables = name of the template to be called if the parameter names are equal }} with Template:Tts containing {{{{{name of first parameter }}}}} (in this case that name is the empty string).
Thus, while carrying out an action in the case of equality can also be done simply by using a template name equal to the constant (the fixed name above), this technique also allows an action in the case of inequality, without having to cover all alternative values (different from the constant) separately.
Example:
Branching depending on whether a parameter is empty is illustrated with Template:Tcw.
- {{t pdc|abc}} gives Template:T pdc
- {{t pdc|}} gives Template:T pdc
Unfortunately there is no control over the result when the parameter is undefined (as opposed to empty):
- {{t pdc}} gives Template:T pdc
Example with an extra parameter:
Consider Template:ine containing "[[:Template:Ine]]
", which calls Template:call containing "[[:Template:Call]]
": If the first parameter is Not Empty then do the task given by the first parameter with the second, third and fourth parameter as its parameters, else do nothing; if the number of parameters of the task is 0, 1, or 2, ignore the superfluous values.
Using Template:Death containing "{{Navbox
| name = Death
| bodyclass = hlist
| state = {{{state<includeonly>|collapsed</includeonly>}}}
| title = [[Death]]
| group1 = In medicine
| list1 =
{{navbox|subgroup
| group1 = [[Cell death]]
| list1 =
* [[Necrosis]]
** [[Avascular necrosis]]
** [[Coagulative necrosis]]
** [[Liquefactive necrosis]]
** [[Gangrene|Gangrenous necrosis]]
** [[Caseous necrosis]]
** [[Fat necrosis]]
** [[Fibrinoid necrosis]]
** [[Temporal lobe necrosis]]
* [[Programmed cell death]]
** [[Activation-induced cell death|AICD]]
** [[Anoikis]]
** [[Apoptosis]]
** [[Autophagy]]
** [[Intrinsic apoptosis]]
** [[Necroptosis]]
** [[Paraptosis]]
** [[Parthanatos]]
** [[Phenoptosis]]
** [[Pseudoapoptosis]]
** [[Pyroptosis]]
* [[Autolysis (biology)|Autolysis]]
* [[Autoschizis]]
* [[Eschar]]
* [[Immunogenic cell death]]
* [[Ischemic cell death]]
* [[Pyknosis]]
* [[Karyorrhexis]]
* [[Karyolysis]]
* [[Mitotic catastrophe]]
* [[Suicide gene]]
| group2 =
| list2 =
* [[Abortion]]
* [[Accidental death]]
* [[Autopsy]]
* [[Brain death]]
** [[Brainstem death]]
* [[Clinical death]]
** [[Dead on arrival|DOA]]
* [[Manner of death|Death by natural causes]]
* [[Death rattle]]
* [[Dysthanasia]]
* [[End-of-life care]]
* [[Euthanasia]]
* [[Lazarus sign]]
* [[Lazarus syndrome]]
* [[Legal death#Medical declaration|Medical declaration of death]]
* [[Organ donation]]
* [[Terminal illness]]
* [[Manner of death|Unnatural death]]
}}
| group2 = [[:Category:Death-related lists|Lists]]
| list2 =
* [[List of causes of death by rate|Causes of death by rate]]
* [[Lists of deaths by year|Notable deaths by year]]
* [[List of expressions related to death|Expressions related to death]]
* [[List of natural disasters by death toll|Natural disasters]]
* [[Lists of people by cause of death|People by cause of death]]
* [[List of premature obituaries|Premature obituaries]]
* [[Preventable causes of death]]
* [[List of unusual deaths|Unusual deaths]]
* [[List of ways people dishonor the dead]]
* [[List of ways people honor the dead]]
| group3 = Mortality
| list3 =
* [[Birthday effect]]
* [[Child mortality]]
* [[Excess mortality]]
* [[Gompertz–Makeham law of mortality]]
* [[Infant mortality]]
* [[Karoshi]]
* [[Maternal death]]
* [[Maternal mortality in fiction]]
* ''[[Memento mori]]''
* [[Micromort]]
* [[Mortality rate]]
** [[Risk adjusted mortality rate|RAMR]]
* [[Mortality salience]]
* [[Perinatal mortality]]
| group4 = After death
| list4 =
{{Navbox|subgroup |groupstyle=font-weight:normal;
| group1 = '''[[Cadaver|Body]]'''
| list1 =
{{navbox|subgroup
| group1 = Stages
| list1 =
* [[Pallor mortis]]
* [[Livor mortis]]
* [[Algor mortis]]
* [[Rigor mortis]]
* [[Putrefaction]]
* [[Decomposition]]
* [[Skeletonization]]
* [[Fossil|Fossilization]]
| group2 = Preservation
| list2 =
* [[Cryopreservation]]
** [[Cryonics]]
** [[Neuropreservation]]
* [[Embalming]]
* [[Maceration (bone)|Maceration]]
* [[Mummy|Mummification]]
* [[Plastination]]
* [[Prosection]]
* [[Taxidermy]]
| group3 = [[Disposal of human corpses|Disposal]]
| list3 =
* [[Burial]]
** [[Natural burial]]
** [[Sky burial]]
* [[Cremation]]
* [[Dismemberment]]
* [[Excarnation]]
* [[Promession]]
* [[Alkaline hydrolysis (body disposal)|Resomation]]
| group4 =
| list4 =
* [[Beating heart cadaver]]
* [[Body donation]]
* [[Cadaveric spasm]]
* [[Coffin birth]]
* [[Death erection]]
* [[Dissection]]
* [[Gibbeting]]
* [[Postmortem caloricity]]
* [[Post-mortem interval]]
}}
|group2 = '''Other aspects'''
|list2 =
* [[Carrion]]
* [[Cemetery]]
* [[Consciousness after death]]
** [[Afterlife]]
** [[Tukdam]]
* [[:Category:Death customs|Customs]]
* [[Crematorium]]
* [[Desecration of graves]]
* [[Eternal oblivion]]
* [[Medical examiner|Examination]]
* [[Funeral]]
* [[Grief]]
* [[Death and the Internet|Internet]]
* [[Death midwife|Midwife]]
* [[Mourning]]
** [[Online mourning]]
* [[Obituary]]
* [[Reincarnation]]
** [[Palingenesis]]
** [[Saṃsāra]]
* [[Resurrection]]
* [[Underworld]]
* [[Vigil]]
}}
| group7 = Paranormal
| list7 =
* [[Ghost|Ghosts]]
* [[Near-death experience]]
* [[Near-death studies]]
* [[Necromancy]]
* [[Out-of-body experience]]
* [[Template:Reincarnation research|Reincarnation research]]
* [[Séance]]
| group8 = Legal
| list8 =
* [[Abortion law]]
* [[Administration (probate law)|Administration]]
* [[Capital punishment]]
* [[Cause of death]]
* [[Civil death]]
* [[Coroner]]
* [[Death-qualified jury]]
* [[Death certificate]]
* [[Presumption of death|Declared death ''in absentia'']]
* [[Death row]]
* [[Dying declaration]]
* [[Inquest]]
* [[Legal death]]
* [[Murder]]
* [[Necropolitics]]
* [[Prohibition of dying]]
* [[Right to die]]
* [[Suspicious death]]
* [[Trust (law)|Trust law]]
* [[Will and testament|Will]]
| group9 = Fields
| list9 =
* {{ill|Death tech|pt|Death Tech}}
* [[Forensic pathology]]
* [[Funeral director]]
* [[Mortuary science]]
* [[Cell death|Necrobiology]]
* [[Post-mortem chemistry]]
* [[Post-mortem photography]]
* [[Taphonomy]]
** [[Biostratinomy]]
* [[Thanatology]]
| group10 = Other
| list10 =
* [[Apparent death]]
* [[Chinese burial money]]
* [[Coins for the dead]]
* [[Dark tourism]]
* [[Darwin Awards]]
* [[Death and culture]]
* [[Death anniversary]]
* [[Death anxiety]]
* [[List of death deities|Death deity]]
** [[Personifications of death|Personification of death]]
** [[Dying-and-rising deity|Dying-and-rising god]]
** [[Psychopomp]]
* [[Extermination camp|Death camp]]
* [[Death drive]]
* [[Death education]]
* [[Death from laughter]]
* [[Death hoax]]
* [[Death knell]]
* [[Death march]]
* [[Death messenger]]
* [[Death notification]]
* [[Death panel]]
* [[Death poem]]
* [[Opisthotonic death pose|Death pose]]
* [[Death-positive movement]]
* [[Death squad]]
* [[Death threat]]
* [[Death trajectory]]
* [[Dignified death]]
* [[Extinction]]
* [[Festival of the Dead]]
* [[Fascination with death]]
* [[Hierarchy of death]]
* [[Homicide]]
* [[Immortality]]
* [[Last rites]]
* [[Longevity]]
* [[Martyr]]
* [[Museum of Death]]
* [[Necronym]]
* [[Necrophilia]]
* [[Necrophobia]]
* [[Philosophy of death]]
* [[Predation]]
* [[Sacrifice]]
** [[Human sacrifice|human]]
* [[Suicide]]
** [[Assisted suicide]]
* {{ill|Thanabot|ca|Grief bot}}
* [[Thanatosensitivity]]
| below =
* {{Icon|Category}} [[:Category:Death|Category]]
* {{Icon|Outline}} [[Outline of death|Outline]]
}}<noinclude>
{{navdoc|collapsed}}
[[Category:Biology navigational boxes]]
[[Category:Death templates| ]]
[[Category:Society and social science navigational boxes|Death]]<!--probably needs focusing-->
</noinclude>
":
- {{ine|death|[[November 2]], [[2004]]|[[Amsterdam]]|}} gives:
"Template:Ine".
- {{ine|death||comment|}} gives "Template:Ine".
This can be useful inside another template, to avoid the texts "Date of death:" and "place of death:" for a living person.
Also, without a separate template Death, with just the more general Template:p2p1p3 containing "[[:Template:P2p1p3]]
":
- {{ine|p2p1p3|[[November 2]], [[2004]]|Date of death: |, place of death: [[Amsterdam]]}} gives:
"Template:Ine".
This would not be convenient to use in many template tags, but could be used in an infobox in the form
- {{ine|p2p1p3|{{{1}}}|Date of death: |, place of death: {{{2}}}}}
We can apply "subst" to remove a "template layer" for server efficiency. It makes no difference for the editors of the pages that include the infobox, and no difference for the editor who wants to understand all inner workings, but it is more cryptic for the editor of the infobox who wants to use template Ine as black box, without being confronted with the internal coding. It gives:
- {{call|=p2p1p3|{{{1}}}=x0|1={{{1}}}|2=Date of death: |3=, place of death: {{{2}}}}}
Applying "subst" again is not possible for the general case where the first parameter may or may not be empty. It would have to be done separately for both cases, thus removing the branching capability.
(Alternatively a separate parameter "dead" with one of the values "dead" and "alive" is used, see e.g. w:en:Template:Infobox President with the auxiliary templates w:en:Template:Infobox President/dead and the empty w:en:Template:Infobox President/alive. A disadvantage is the extra parameter: it has to be specified that a president is alive, it is not sufficient to leave the date of death empty, or that a president is dead, even if a date of death has been specified. An advantage is that backlinks are available, providing not only a list of dead, but also a list of alive presidents for which the infobox is used.)
Similarly, where a table row dealing with a parameter is removed if the parameter is empty:
w:en:Template:If defined call1 calls w:en:Template:Template_call1 with 1={{{2}}} followed by 1{{{1}}}=void; if {{{1}}} is empty then this overwrites the value of 1, so 1=void, otherwise 1={{{2}}}, giving an empty result or {{{{{2}}}|{{{3}}}}}. {{{3}}} is typically the same as {{{1}}} (at least that is the case in all five cases in w:en:Template:Infobox CVG). It avoids e.g. the text "Designer:" if the parameter {{{designer}}} is empty.
More generally, using Template:If equal g containing "[[:Template:If equal g]]
":
- {{if equal g|x2|x3|{{NAMESPACE}}|Help|a||}} gives Template:If equal g
- {{if equal g|x2|x3|Help|{{NAMESPACE}}|a||}} gives Template:If equal g
- {{if equal g|x2|x3|{{NAMESPACE}}|Template_talk|a||}} gives Template:If equal g
- {{if equal g|x2|x3|Template_talk|{{NAMESPACE}}|a||}} gives Template:If equal g
Note that {{NAMESPACE}} produces underscores for spaces, which are not considered equal by the template:
- {{if equal g|x2|x3|Template_talk|Template talk|a||}} gives Template:If equal g
- {{if equal g|x2|x3|Template_talk|Template_talk|a||}} gives Template:If equal g
A parameter name in a parameter tag can now depend on a parameter, see Template:T pnd1 and its talk page.
Also a parameter name in a template call can now depend on a variable: {{ns:2}} gives User and {{PUser|User=abc}} gives Template:PUser, hence {{PUser|{{ns:2}}=abc}} gives Template:PUser
Using "subst:" with manual recursion gives a stepwise replacement, useful for analyzing and explaining the working of templates calling other templates. See e.g. Template talk:Lop.
Including the content of a template in a template or variable name or parameter value
It is now possible to use a template with a name dependent on the content of another template. For example: {{{{tctc}} }}, using Template:Tctc containing "[[:Template:Tctc]]
" and Template:Tc containing "<includeonly>{{#Invoke:Template link general|main|nolink=yes|code=yes|nowrap=yes}}</includeonly><noinclude>
{{Documentation|1=Template:Tlg/doc
|content = {{tlg/doc|tlc}}
}}
<!-- Add categories to the /doc subpage, not here! -->
</noinclude>
", gives "{{Template:Tctc }}". If there are no parameters, a space is needed between e.g. the two pairs of closing braces.
It is now possible (since about 19 October 2005) to use a variable with a name dependent on the content of a template.
- For example: {{CURRENT{{t day}}}} using Template:T day containing "
[[:Template:T day]]
" gives the text {{CURRENTTemplate:T day}}, which is indeed the value of {{CURRENTDAY}}
It is now possible (since about 19 October 2005) to include the content of another template in a parameter value
Examples:
- {{x3|{{tc}}}}, using Template:x3, gives .
- {{x3|{{x5|{{tc}}}}}} gives .
Thus it is now also possible to use a data array as parameter of a template, e.g.:
{{hist5a|x|t data}} using
Template:Timcnl and
Template:t data containing "[[:Template:T data]]
" gives:
A template containing an assignment of a parameter value to a parameter name
With m:Template:t (backlinks ),
- Template:t par ass 1 containing "
[[:Template:T par ass 1]]
" - Template:t par ass 2 containing "
[[:Template:T par ass 2]]
" - Template:t par ass 3 containing "
[[:Template:T par ass 3]]
"
- {{t|{{t par ass 1}}}} gives {{[[Template:Template:T par ass 1|Template:T par ass 1]]}}
- {{t|{{t par ass 2}}}} gives {{[[Template:Template:T par ass 2|Template:T par ass 2]]}}
- {{t|{{t par ass 3}}}} gives {{[[Template:Template:T par ass 3|Template:T par ass 3]]}}
The third example shows that a template cannot contain multiple assignments of a parameter value to a parameter name.
Illustration of the possibilities of template calls and links
[[aTemplate:T complexb|pTemplate:T complexq]]
is the result of [[a{{t complex|c=d|g=h|k=m}}b|p{{t complex|c=d|g=h|k=n}}q]]
where Template:T complex contains:
[[:Template:T complex]]
and Template:T aHelpbdd contains:
[[:Template:T aHelpbdd]]
[[w:en:{{n en|de}}]] gives [[w:en:Template:N en]].
[[{{n en|de}} TV coverage of Wikipedia]] gives [[Template:N en TV coverage of Wikipedia]].
This page can now also be included based on the code "de" using {{:{{n en|de}} TV coverage of Wikipedia}}.
Producing the value of a parameter whose name depends on the value of another parameter
A parameter value can be used as the name of another parameter, even of the same template. For example,
{{tvv | parameter=foo | foo=bar}}
using Template:tvv containing "[[:Template:Tvv]]
" gives Template:Tvv
.
For different names the order of the parameters does not matter:
{{tvv | foo=bar | parameter=foo }}
still gives Template:Tvv
.
{{tvv|parameter={{{a|foo}}}|foo=bar}} gives Template:Tvv
However, with substitution it gives the wikitext {{{{{{a|foo}}}}}} rendered as {{{foo}}} .
Also, the technique cannot be applied multiple times. For example,
{{tvvv | 1=foo | foo=bar | bar=biz}}
using Template:tvvv containing "[[:Template:Tvvv]]
" gives Template:Tvvv
.
This is e.g. applied in en:Template:Reg polyhedra db (backlinks ), which contains a 2D array in the form {{{{{1}}}|{{{2}}}|1-1=a11|..|m-n=amn}}. The first parameter is the name of a template that provides a particular selection and presentation of a selected row of the array, e.g. en:Template:Reg polyhedron stat table (backlinks ), the second parameter (which is the first parameter of the latter template) specifies the row. The latter templates references element j of the row concerned by a tag of the form {{{{{{1}}}-j}}}
The technique can also be used to create control flow structures. An ifdef-function as in m:Template:ifdef (backlinks ) could look like:
{{{test{{{test|}}}|{{{then}}}}}}
If test is empty, we expand the empty test parameter, but if it contains data, then after trying to expand a non-existing testdata-parameter, we get the then-parameter value instead. Or a literal {{{then}}}, if there's intentionally no default value for then, and then is undefined - a crude mechanism to catch errors.
Of course this fails for a say test value it if testit is defined. An example with numerical parameters:
{{{1{{{1|}}}|okay}}}
For a defined first parameter we expect to get the text okay. But if the value of the first parameter is say 0, and a tenth parameter exists, we get its value {{{10}}} instead of okay.
It's slightly different for an ifndef-function as in m:Template:ifndef (backlinks ):
{{{then{{{test|}}}|}}}
If test is empty, then we expand the then parameter. But if test contains data, then we try to expand a nonexisting thendata-parameter, finally arriving at its empty default value (= after the second "|" pipe symbol).
Again this fails if the non-existing parameter in fact does exist, e.g. for
{{{x{{{1|}}}|}}}
with a defined value y for x we expect to get the empty default for a non-existing xy. This fails if {{{xy}}} is defined and non-empty.
An if-then-else could be a combination of those two, as in Template:if containing "{{ safesubst:<noinclude/>p{{ safesubst:<noinclude/>#ifeq:{{{1}}}|eq|1|2}}|{{ safesubst:<noinclude/>p{{ safesubst:<noinclude/>#ifeq:{{{2}}}|{{{3}}}|1|2}}|{{{4|}}}|{{{5|}}}}}|{{ safesubst:<noinclude/>p{{ safesubst:<noinclude/>#if{{{1}}}:{{{2}}}|1|2}}|{{{3}}}|{{{4|}}}}}}}<noinclude>
{{Documentation}}
</noinclude>
".
For simple ifdef-cases the best solution is arguably to use it without additional template, e.g. for text relevant only if the third positional parameter is defined use:
{{{3{{{3|}}}|found third parameter}}}
For the opposite ifndef-case there's unfortunately no similar direct approach. Substitution works for ifdef, but not ifndef or if.
A parameter value can also be used as part of the name of another parameter:
{{switch |{{CURRENTDOW}} |case: 1=Mon |case: 2=Tue |case: 3=Wed |case: 4=Thu |case: 5=Fri |case: 6=Sat |case: 0=Sun |default=No date }}
using Template:switch containing "<noinclude>
<!-- This is intentionally a soft redirect to show an error when transcluded. Do not change this to a hard redirect. -->
{{Soft redirect|Help:Switch parser function}}</noinclude><includeonly>{{error|<nowiki> Don't write <code>{{switch</code>, write <code>{{#switch:</code>.</nowiki>}}</includeonly>
" gives Don't write <code>{{switch</code>, write <code>{{#switch:</code>.
Using this technique and an auxiliary template, we can produce a function that checks if two parameter values are the same:
Template:equal containing "[[:Template:Equal]]
", with Template:vv2 containing "[[:Template:Vv2]]
".
It will return 1 if equal, or null (the empty string) if not.
You must be logged in to post a comment.