Bản mẫu:Sclass/core/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:Sclass/core. 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. |
Bản mẫu này sử dụng những tính năng phức tạp của cú pháp bản mẫu.
Bạn được khuyến khích làm quen với cấu trúc của bản mẫu này và các hàm cú pháp trước khi sửa đổi bản mẫu. Nếu sửa đổi của bạn gây ra lỗi không mong muốn, hãy sửa chữa hoặc lùi lại nhanh chóng, vì bản mẫu này có thể xuất hiện trên một số lượng lớn trang. |
Cách sử dụng
sửaĐây là một trang con tài liệu sử dụng bản mẫu dành cho Bản mẫu:Sclass/core. 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. |
Đây là bản mẫu copy từ Wikipedia.en
Bản mẫu này là thiết yếu cho hoạt động của các bản mẫu {{sclass}}
, {{sclass2}}
, {{sclass-}}
, and {{sclass2-}}
.
Sử Dụng
sửa{{sclass}}
, {{sclass2}}
, {{sclass-}}
, and {{sclass2-}}
pass all of the parameters received from the article along with a format parameter to {{sclass/core}}
. The format parameter, simply the name of the calling template, controls how {{sclass/core}}
formats the output. Output format is described in the appropriate template documentation.
{{sclass|class name|ship type|format|ship-type disambiguator|class-name disambiguator|format=template name}}
- the unnamed third parameter (format) should not be confused with the named parameter
|format=
. The unnamed third parameter controls how the various parts are assembled and linked. The named|format=
parameter controls italics and hyphenation.
- the unnamed third parameter (format) should not be confused with the named parameter
In article space the {{sclass}}
template is written:
{{sclass|Haskell|attack transport|3}}
{{sclass}}
makes a call to {{sclass/core}}
that more-or-less amounts to this:
{{sclass/core|Haskell|attack transport|3|||format=sclass}}
The other templates in this family do the same except that the |format=
parameter is different:
{{sclass}}
:|format=sclass
{{sclass2}}
:|format=sclass2
{{sclass-}}
:|format=sclass-
{{sclass2-}}
:|format=sclass2-
Test cases for this template and for {{sclass/core/sandbox}}
are at the testcases page.