Bản mẫu:Formatting error/doc
![]() | Đây là một trang con tài liệu sử dụng bản mẫu dành cho Bản mẫu:Formatting error. Nó gồm có các thông tin hướng dẫn sử dụng, thể loại và các nội dung khác không thuộc về phần trang bản mẫu gốc. |
Outputs an error message in red into the page and adds the page to Thể loại:Trang dùng bản mẫu định dạng một cách không chính xác. 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. Bản mẫu: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.
Cách sử dụng[sửa mã nguồn]
- {{FormattingError|thông báo lỗi}}
hoặc
- {{FormattingError|thông báo lỗi|nocategory=true}}
When using the nocategory argument, the error message is displayed as usual, but the page is not added to Thể loại:Trang dùng bản mẫu định dạng một cách không chính xác. 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:
{{#iferror:{{val|XX}}|lỗi|OK}}
→lỗi
Xem thêm[sửa mã nguồn]
- Thể loại:Trang dùng bản mẫu định dạng một cách không chính xác để xem danh sách các trang đã được đánh dấu là sử dụng một bản mẫu định dạng không đúng cách sử dụng bản mẫu này.
- {{Error}}
- {{TryCatch}}