Пређи на садржај

Шаблон:Formatting error

Iz Vojne Enciklopedije
(разл) ← Старија измена | Тренутна верзија (разл) | Новија измена → (разл)

Грешка у шаблону{{#switch:Шаблон

|Разговор
|Корисник
|Разговор с корисником
|Шаблон:Ns:Wikipedia talk=
|#default={{#if:x|
 |
}}

}}

Документација шаблона[прикажи] [уреди] [историја] [освежи]

{{#ifeq:formatting error |док

    | 

{{#ifeq:show |show

|
        }}{{#if: |
         |   {{#ifexist:Шаблон:Formatting error
                  | [[Категорија:Документација {{#switch:Шаблон |Шаблон=шаблона |Модул=модула |Корисник=корисничких страница |#default=Википедије}}]]
                  | 
                 }}
        }}
    | 
   }}

Outputs an error message in red into the page and adds the page to Category:Pages with incorrect formatting templates use. An anchor (FormattingError) is inserted at the start of the error message, so you can find any errors on a page easily by adding #FormattingError at the end of the URL (e.g. Template:val/test#FormattingError). Used in complex templates that check their arguments for validity, so incorrect use can be spotted while editing a page or afterwards.

Usage

  • {{FormattingError|error message}}

or

  • {{FormattingError|error message|nocategory=true}}

When using the nocategory argument, the error message is displayed as usual, but the page is not added to Category:Pages with incorrect formatting templates use. This is useful in documentation pages for templates that use FormattingError and show what errors they can generate without adding these documentation pages to the category. For an example of this, see {{LinkForElement}}.

This template can be evaluated using the {{#iferror}} parser function:

See also