Template:Lock Standard State/doc View history

Revision as of 03:49, 31 December 2014 by Qwaletee (talk | contribs) (Draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is a documentation subpage for Template:Lock Standard State.
It contains usage information, categories and other content that is not part of the original template page.

This template simplifies calls to the Locking Standard template. The parameter list is somewhat long, and easy to confuse should there be multiple variatios of locking standards within the state. To simplify this, a second template -- this one -- can be used to can the call for each area.

You call this template as follows:
{{Lock Standard State|XY}}
...where XY is a state abbreviation or the like.

The template is a large "switch" statement that shows all the "states" (or provinces, regions, etc.) for which it is programmed. To program a new one, you must first know how to use Standard Locking -- this template doesn't eliminate that work, it just self-documents it, makes your wiki code look much cleaner, and less likely to accidentally break. (However, anyone touching the code here can break a lot of state pages!)

Once you have the definition, use the following guidance to add a new state/region/group of localities/etc. Each state abbreviation must be in all UPPER CASE, and takes a format like this:

| AB = {{Locking Standard

  <!--optional comment explaining source of information, etc., the dashes, ! and LT/GT are part of the wiki code and must be present-->
  |paramA=value value value
  |paramB=text text text
  |pC=1|pD=2
  |pC1=3|pD1=4
  |pC2=5|pD2=6}}

| CD = {{Locking Standard}} <!--simple case, uses no params, only defaults--> | REGION9 | REGION9PROVINCE1 | REGION9PROVINCE2 | REGION9PROVINCE3 = {{</nowiki>Locking Standard

  |lede=This locking standard applies to the entire Region 9 (all three member provinces, Province1, Province2, Province3)
  |Fwy=5}}

| NEW SMALLVILLE | NEW BIGVILLE = {{</nowiki>Locking Standard|Fwy=4}}

  <!--New Smallville and New Bigville share the same setup, so only one of them has to actually have the code (always the last one), and the others don't have an = {{</nowiki>Locking Standard... the wiki understands to just pick the next one actually specified-->