defzone.net@gmail.comLiên hệ
DZ
DefZone.Net

Kien thuc cong nghe & giai tri

Bai vietDia diemAlbum anhGameCua hang
  1. Home
  2. Wiki
Template documentation[view] [edit] [history] [purge]
This template uses Lua:
  • Module:Params (sandbox)

The templates {{Error if empty}} is used to avoid unwanted transclusions of the {{Error}} template in the cases in which the {{#if}} (or a similar) parser function is not directly used for determining the error conditions. In these cases, these templates will appear permanently transcluded instead of {{Error}}.

Usage

[edit]

This template checks whether the first parameter is empty. If it is, it redirects all other parameters, shifted, to {{Error}}; otherwise it shows the first parameter, trimmed of trailing and leading spaces.

  • {{Error if empty|Hello world|Error: Lorem ipsum dolor sit amet.}}
    ↳ Hello world
  • {{Error if empty||Error: Lorem ipsum dolor sit amet.}}
    ↳ Error: Lorem ipsum dolor sit amet.
  • {{Error if empty|}}
    ↳ Error: There is no text to show.
  • {{Error if empty}}
    ↳ Error: There is no text to show.

See also

[edit]
  • Category:If-then-else templates
The above documentation is transcluded from Template:Error if empty/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
DZ
DefZone.Net

Noi chia se kien thuc, huong dan va kham pha cong nghe.

Lien ket nhanh

Trang chủBài viếtWikiCửa hàngLiên hệ

Liên hệ

Email: defzone.net@gmail.com
Điện thoại: +84 762 559 696
Địa chỉ: Thiên Hương, Thủy Nguyên, Hải Phòng

Đăng ký nhận tin

Nhận bài viết và cập nhật mới nhất qua email.

© 2025 DefZone.Net. All rights reserved.
PrivacyTermsSitemap