Template:Function Description Box: Difference between revisions

From wiki.jriver.com
Jump to navigation Jump to search
No edit summary
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 2: Line 2:
|- valign="top"
|- valign="top"
! scope="row" style="background: #ecedf3; color: #111; border-style: solid; border-width: 2px 1px 0 2px; border-right: 1px solid #bbb;" width="100" | Description
! scope="row" style="background: #ecedf3; color: #111; border-style: solid; border-width: 2px 1px 0 2px; border-right: 1px solid #bbb;" width="100" | Description
| style="background: #f9f9f9; color: #111; border-style: solid; border-width: 2px 2px 0 0" width="1200" | <span style="font-family: monospace,monospace; font-size:1em; color:#0f3f8d; font-size:110%"><b>{{{name}}}(</b><i>{{{arguments}}}</i><b>)</b></span>
| style="background: #f9f9f9; color: #111; border-style: solid; border-width: 2px 2px 0 0" width="1200" | <span style="font-family: monospace,monospace; font-size:1em; color:#0f3f8d; font-size:110%"><b>[[{{{name}}}()|{{{name}}}]](</b><i>{{{arguments}}}</i><b>)</b></span>
{{{description}}}
The [[#Field|Field()]] function returns the value stored in field <i>name</i>.
The format of return is selected by <i>mode</i>.

Available <i>mode</i> values:
<div style="margin-left: 20pt;"><table style="border-spacing:0px; border-collapse:collapse; background: #f9f9f9">
<tr><td style="text-align:left; padding-right:20pt"><b>0</b></td><td>Raw, unformatted data</td></tr>
<tr><td style="text-align:left; padding-right:20pt"><b>1</b></td><td>Formatted data</td></tr>
</table></div>

Argument <i>mode</i> is optional (defaults to 1).


|- valign="top"
|- valign="top"
! scope="row" style="background: #ecedf3; color: #111; border-style: solid; border-width: 0px 1px 2px 2px; border-top: 1px solid #bbb; border-right: 1px solid #bbb;" | Examples
! scope="row" style="background: #ecedf3; color: #111; border-style: solid; border-width: 0px 1px 2px 2px; border-top: 1px solid #bbb; border-right: 1px solid #bbb;" | Examples
|style="background: #f9f9f9; color: #111; border-style: solid; border-width: 0px 2px 2px 0; border-top: 1px solid #bbb;" | <span style="font-family: monospace,monospace; font-size:1em;"><b><nowiki>field(album)</nowiki></b></span>
|style="background: #f9f9f9; color: #111; border-style: solid; border-width: 0px 2px 2px 0; border-top: 1px solid #bbb;" | {{{examples}}}
<p style="margin-left:20pt;">Returns the formatted value of field <i>name</i> <span style="font-family: monospace,monospace; font-size:1em;">album</span>.
Note that this is equivalent to <span style="font-family: monospace,monospace; font-size:1em;">[album]</span>.</p>
<span style="font-family: monospace,monospace; font-size:1em;"><b><nowiki>field(date, 0)</nowiki></b></span>
<p style="margin-left:20pt;">Returns the raw, unformatted value stored in the <span style="font-family: monospace,monospace; font-size:1em;">date</span> field.
Note that this is equivalent to <span style="font-family: monospace,monospace; font-size:1em;">[date,0]</span>.</p>
|}
|}
<div style="text-align:right;">([[#top|Back to top)]]</div>
<div style="text-align:right;">([[#top|Back to top]])&nbsp;&nbsp;&nbsp;([[Expression Functions#Function Index|Function index]])</div><noinclude>
== Usage ==

<noinclude>
|}

Function Description Box Template:


Typing <tt><nowiki>{{Function Description Box|FUNCTION NAME|FUNCTION ARGUMENTS}}</nowiki></tt> produces the message shown at the top.</noinclude>
Typing <tt><nowiki>{{Function Description Box|FUNCTION NAME|FUNCTION ARGUMENTS}}</nowiki></tt> produces the message shown at the top.</noinclude>

Latest revision as of 20:56, 25 January 2016

Description [[{{{name}}}()|{{{name}}}]]({{{arguments}}})

{{{description}}}

Examples {{{examples}}}
(Back to top)   (Function index)

Usage

Typing {{Function Description Box|FUNCTION NAME|FUNCTION ARGUMENTS}} produces the message shown at the top.