This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Difference between revisions of "Template:PrevLink"

From OWASP
Jump to: navigation, search
(Uses the second parameter as label if present, otherwise the first parameter is used as label)
(Handled the case when the first parameter is omitted or empty)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[{{{1}}}|««{{{2|{{{1}}}}}}««]]
+
<noinclude>==Purpose==
 +
Generates a "Prev" link to the URL/page given in the first parameter with a link label equal to the value of the second parameter, if present, otherwise with a link label equal to the value of the first parameter. If the first parameter is absent, the label [This is the first page] is generated.
 +
 
 +
==Usage==
 +
<pre>{{PrevLink|link|label}}</pre>
 +
 
 +
==Code==
 +
<pre>{{ #if: {{{1|}}}
 +
  | [[{{{1}}}|&amp;laquo;&amp;laquo;{{{2|{{{1}}}}}}&amp;laquo;&amp;laquo;]]
 +
  | [This is the first page]
 +
}}</pre>
 +
</noinclude>
 +
<includeonly>
 +
{{ #if: {{{1|}}}
 +
  | [[{{{1}}}|&laquo;&laquo;{{{2|{{{1}}}}}}&laquo;&laquo;]]
 +
  | [This is the first page]
 +
}}
 +
</includeonly>

Latest revision as of 17:48, 8 September 2010

Purpose

Generates a "Prev" link to the URL/page given in the first parameter with a link label equal to the value of the second parameter, if present, otherwise with a link label equal to the value of the first parameter. If the first parameter is absent, the label [This is the first page] is generated.

Usage

{{PrevLink|link|label}}

Code

{{ #if: {{{1|}}}
   | [[{{{1}}}|&laquo;&laquo;{{{2|{{{1}}}}}}&laquo;&laquo;]]
   | [This is the first page]
}}