Template:VIC-is-status-valid/doc

Usage edit

This helper template is used to determine if the status parameter in the {{VIC}} and {{VIC-thumb}} templates used for the display of Valued images candidates is set to a valid value. The template is called using the status as the first argument and returns "1" if the status is valid and "" (empty string) if not. Thus, when used in conjunction with #if, the first clause will be rendered if the status is valid, and the second if it is not valid:

{{#if:{{VIC-is-valid-status|{{{status}}}}}
  |Do what you intend to do as the status is valid
  |Indicate to the user that the status field is wrong}}

Valid values of the status parameter edit

The status parameter is case-sensitive. Valid valued are

  • nominated
  • supported
  • discussed
  • opposed
  • promoted
  • declined
  • withdrawn
  • undecided

Examples edit

  • {{VIC-is-status-valid|discussed}}=1
  • {{VIC-is-status-valid|adored}}=
  • {{VIC-is-status-valid|Supported}}=
  • {{#if: {{VIC-is-status-valid|nominated}}|nominated is a valid status|nominated is an invalid status}}=nominated is a valid status
  • {{#if: {{VIC-is-status-valid|Absolutely wrong}}|Absolutely wrong is a valid status|Absolutely wrong is an invalid status}}=Absolutely wrong is an invalid status

See also edit