Template:Goto

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search
[edit] [purge] Template-info.svg Template documentation

Purpose

Used with {{Get}}, this allows to to send and return a number on the current page. This can be used to change the content of an existing page without having to create a separate page for each change, but just adjust the existing page.

Syntax

{{Goto|desired number|Text to display - optional}}

Skinned as a button:

{{Goto|desired number|Text to display - optional|button=yes}}

Examples

The current number is 0 using {{Get}}, or the number is 0 using {{CGI}}. (Note that although this does use the same technique as {{CGI}}, it does have a larger number of variables it can cope with.)

Syntax Result
{{Goto|1|button=yes}} Go to page 1
{{Goto|1}} Go to page 1
{{Goto|1|Proceed to page 1}} Proceed to page 1
{{Goto|1000|Set number to 1000}} Set number to 1000
{{Goto|{{#expr:{{Get}} + 1}}|Go to next page}} Go to next page
{{Goto|{{#expr:{{Get}} - 1}}|Return to previous page}} Return to previous page
{{Goto|583|Do you pick up the sword?}} Do you pick up the sword?
{{Goto|{{#expr:({{Get}} + 1) mod 10}}|Display text|Hover text|color:black;}} Display text
{{Goto|{{#expr:{{Get}} *2}}|Multiply by 2|Hover text|color:purple;}} Multiply by 2

This cannot process numbers larger than 12 digits. This equates to a maximum of 999,999,999,999.

This also means this will not take figures larger than 239.86, however it will allow negative values, giving a range of 40 binary "switches".