Help:Page Versions

From Pizza Tower Scoutdigo Wiki
Jump to navigation Jump to search

Page versions allow editors to maintain the same page for multiple versions of Scoutdigo. Users can select which version of the page they're viewing via the bar at the top of the page.

Creating Versions

{{v/bar}}

First, make sure the page has the {{v/bar}} template on the first line. In the first template parameter, include a list of all the versions in which the page is different, separated by spaces. The second parameter specifies the default page version. If it is unspecified, ce3 is the default. More often than not, you’ll want to choose versions from the list of official versions at the bottom of this page. If you don't, the third argument allows you to specify custom names for each version in the first parameter. They should be a comma separated list in the same order as the first parameter.

  • Example: {{v/bar|1.1 1.2 ce3 ce4 2|1.2}} produces a bar with the options (v1.1, v1.2, v1.2.3 CE, v1.2.4 CE, v2), and selects v1.2 by default.

{{v}}

The {{v}} template lets you mark text to only appear in a certain version. This can be used to make small changes to a large portion of text while keeping the rest the same. To start, use {{v}} with an argument specifying the version or versions the text should appear in. Multiple versions should be separated by spaces in the same argument.

  • Example:
Something{{v|1.2}} else{{v}} happens in v1.{{v|1.1}}1{{v}}{{v|1.2}}2{{v}}.
produces “Something happens in v1.1.” when the page is viewed in 1.1, and “Something else happens in v1.2.” when the page is viewed in 1.2.

This method can be confusing to some however, so it's fine to simplify things by making both versions of the sentence separate. You can also nest {{v}}s to allow multiple verisons to share similar text while changing the text completely for another version.

{{v/block}}

{{v}} has certain limitations that prevent it from being used to change entire sections of text such as headings. To do so, you must wrap it in {{v/block}}, with the same parameter you would use for {v}}. You can nest {{v}}s and {{v/block}}s inside a {{v/block}}, but you cannot nest a {{v/block}} in a {{v}} due to its limitations.

  • Example:
{{v/block|1.2 ce3}}
* Hello world!{{v/block}}
produces:
  • Hello world!
when the page is viewed in either v1.2 or v1.2.3 CE.

“Advanced” Techniques

Fundamentally, {{v}} and {{v/block}} produce a span or div respectively with the classes defined by the first parameter. This means that you can apply these classes to just about any element quite simply. Many templates have a class parameter in which you can supply version numbers just like {{v}}. This should allow you to make just about anything version specific, from tables and infoboxes to images and embeds. Unfortunately due to things beyond my control list items will be spaced weirdly when wrapped in a {{v/block}}, so you'll need to manually create lists using html tags (<ul>/<ol> & <li>s). Even when not using the templates, make sure you still include {{v/bar}} on the first line of the page.

Remember, don't be afraid to ask WestCraft15 for help!

Official Version List

  • 1.1 - v1.1
  • af - April Fools
  • 1.2 - v1.2
  • 1.2.1 - v1.2.1
  • ce2 - v1.2.2 CE
  • ce3 - v1.2.3 CE
  • ce4 - v1.2.4 CE
  • 2 - v2.0