Bản mẫu:Format link/doc

Bách khoa toàn thư mở Wikipedia

This template formats a link for use in hatnote templates. It accepts two positional parameters, the link, and an optional display value. Links to categories and files are automatically escaped with the colon trick, and links to sections are automatically formatted as trang § phần, rather than the MediaWiki default of trang#phần.

Bản mẫu này không làm việc với thế.

Cách sử dụng[sửa mã nguồn]

Chỉ liên kết:

{{format link|liên kết}}

Liên kết cộng với hiển thị:

{{format link|liên kết|hiển thị}}

Nếu liên kết hoặc các giá trị hiển thị chứa một dấu bằng, bạn sẽ cần phải chỉ định các tên tham số như sau:

{{format link|1=liên kết|2=hiển thị}}

Các ví dụ[sửa mã nguồn]

  • {{format link|Sư tử}} → [[Sư tử]] → Sư tử
  • {{format link|Sư tử#Từ nguyên}} → [[Sư tử#Từ nguyên|Sư tử § Từ nguyên]] → Sư tử § Từ nguyên
  • {{format link|Thể loại:Sư tử}} → [[:Thể loại:Sư tử]] → Thể loại:Sư tử
  • {{format link|Sư tử#Từ nguyên|Từ nguyên của sư tử}} → [[Sư tử#Từ nguyên|Từ nguyên của sư tử]] → Từ nguyên của sư tử
  • {{format link}}Lỗi: không có liên kết cụ thể (trợ giúp).

Xem thêm[sửa mã nguồn]