No edit summary
(bib layout)
Line 1: Line 1:
= [[Wikipedia:Help:Magic words]] =
Currently this file is available online [http://www.cd3wd.com/cd3wd_40/JF/419/08-319.pdf here].


==Variables==
'''Bibliographic Information:'''<br>
''For documentation, refer to the [[mw:Help:Magic words#Variables|Variables]] section of the MediaWiki page.''
Nair, P.K.R., 1980, "Agroforestry Species: A Crop Sheets Manual," International Council for Research in Agroforestry (ICRAF), Nairobi, Kenya, pp. 336.  <br>
'''Copyright Information:''' © 1980<br><noinclude>


*'''FULLPAGENAME''' {{FULLPAGENAME}} (page title including namespace)
*'''PAGENAME''' {{PAGENAME}} (page title excluding namespace)
*'''BASEPAGENAME''' {{BASEPAGENAME}} (page title excluding current subpage and namespace - effectively the parent page without the *namespace.)
*'''SUBPAGENAME''' {{SUBPAGENAME}} (subpage part of title)
*'''SUBJECTPAGENAME''' {{SUBJECTPAGENAME}}, '''ARTICLEPAGENAME''' {{ARTICLEPAGENAME}} (associated non-talk page)
*'''TALKPAGENAME''' {{TALKPAGENAME}} (associated talk page)
*'''NAMESPACE''' {{NAMESPACE}} (namespace of current page)
*'''SUBJECTSPACE''' {{SUBJECTSPACE}}, '''ARTICLESPACE''' {{ARTICLESPACE}} (associated non-talk namespace)
*'''TALKSPACE''' {{TALKSPACE}} (associated talk namespace)
*'''FULLPAGENAMEE''' {{FULLPAGENAMEE}}, '''NAMESPACEE''' {{NAMESPACEE}} etc. (equivalents encoded for use in MediaWiki URLs)


==Parser functions==
{{DEFAULTSORT:{{SUBPAGENAME}}}}
''These are fully documented at the [[mw:Help:Magic words|Meta magic words page]] or [[mw:Help:Extension:ParserFunctions|ParserFunctions Extension documentation]] unless otherwise stated.''
[[Category:AT Sourcebook subpages]]
 
[[Category:Appropriate_technology]]
===Conditional expressions===
[[Category:Food and agriculture]]
These are covered at the [[mw:Help:Extension:ParserFunctions|extension documentation page]]. Some parameters are optional.
[[Category:Agriculture]]
*<tt><nowiki>{{#expr:</nowiki> ''expression'' <nowiki>}}</nowiki></tt> (evaluates the given expression; see [[Help:Calculation]])
</noinclude>
*<tt><nowiki>{{#if:</nowiki> ''test string'' | ''value if non-empty'' | ''value if empty'' <nowiki>}}</nowiki></tt> (selects one of two values based on whether the test string is empty)
*<tt><nowiki>{{#ifeq:</nowiki> ''string 1'' <nowiki>|</nowiki> ''string 2'' <nowiki>|</nowiki> ''value if equal'' <nowiki>|</nowiki> ''value if unequal'' <nowiki>}}</nowiki></tt> (selects one of two values based on whether the test strings are equal – numerically if applicable)
*<tt><nowiki>{{#iferror:</nowiki> ''test string'' <nowiki>|</nowiki> ''value if error'' <nowiki>|</nowiki> ''value if correct'' <nowiki>}}</nowiki></tt> (selects value based on whether the test string generates a parser error)
*<tt><nowiki>{{#ifexpr:</nowiki> ''expression'' <nowiki>|</nowiki> ''value if true'' <nowiki>|</nowiki> ''value if false'' <nowiki>}}</nowiki></tt> (selects value based on evaluation of expression)
*<tt><nowiki>{{#ifexist:</nowiki> ''page title'' | ''value if exists'' | ''value if doesn't exist'' <nowiki>}}</nowiki></tt> (selects value depending on whether a page title exists)
*<tt><nowiki>{{#switch:</nowiki> ''test'' | ''case1'' = ''value for case 1'' | ... | ''default'' <nowiki>}}</nowiki></tt> (provides alternatives based on the value of the test string)
 
Note that with <code>#if:</code> expressions, a variable like <code><nowiki>{{{1}}}</nowiki></code> always requires a final pipe: <code><nowiki>{{{1|}}}</nowiki></code>. If it is absent, then whenever the parameter 1 is absent, instead of leaving the field blank the software will use the actual text ''<code>{{{1}}}</code>'' and the field will never be empty.
 
For the use of these functions in tables, see [[Wikipedia:Conditional tables|Conditional tables]].

Revision as of 00:33, 27 April 2013

Currently this file is available online here.

Bibliographic Information:
Nair, P.K.R., 1980, "Agroforestry Species: A Crop Sheets Manual," International Council for Research in Agroforestry (ICRAF), Nairobi, Kenya, pp. 336.
Copyright Information: © 1980

Cookies help us deliver our services. By using our services, you agree to our use of cookies.