Bản mẫu:TOC top

Bách khoa toàn thư mở Wikipedia
Tài liệu bản mẫu[xem] [sửa] [lịch sử] [làm mới]

This is used to create custom table of contents templates such as {{list TOC}}. It replaces and suppresses the ToC that the wiki software would automatically generate.

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

Please note that this is solely for ease of maintaining existing templates. Please do not use this to write new templates: instead, browse through Thể loại:Bản mẫu mục lục Wikipedia and use an existing template. This code is one of the final pieces in cleaning up years of redundant and overlapping code in this area.

Các tham số (tùy chọn)[sửa mã nguồn]

title
The title to use for this ToC element. The default is Mục lục.
align
Sets the CSS float and clear properties, which forces this float underneath the side specified with this attribute. So, align=right will place the element after all the right floating elements before it. Options are left, right, center, or none (default).
clear
Overrides the default CSS clear property set by the align parameter, which is not typically needed. Options are left, right, both, or none. The defaults are left when |align=left, right when |align=right, none when |align=center, and left when |align=none. Use |clear=none to allow other floating elements to float next to the table of contents, and |clear=both to force the table of contents to have nothing next to it.
primary
Set this to false if this ToC is not used as the primary ToC of a page. This makes sure that the title of this ToC does not show up in the primary ToC. A side effect of this is the disappearing of the show/hide toggle.

Dữ liệu bản mẫu[sửa mã nguồn]

Đây là tài liệu Dữ liệu bản mẫu cho bản mẫu này được sử dụng bởi Trình soạn thảo trực quan và các công cụ khác; xem báo cáo sử dụng tham số hàng tháng cho bản mẫu này.

Dữ liệu bản mẫu cho TOC top

This is used to create custom table of contents templates. It replaces and suppresses the ToC that the wiki software would automatically generate.

Tham số bản mẫu[Quản lý Dữ liệu bản mẫu]

Tham sốMiêu tảKiểuTrạng thái
Titletitle

The title to use for this ToC element. The default is Contents.

Chuỗi dàitùy chọn
Alignalign

Sets the CSS float and clear properties, which forces this float underneath the side specified with this attribute. So, "right" will place the element after all the right floating elements before it. Options are left, right, center, or none (default).

Chuỗi dàitùy chọn
Clearclear

Overrides the default CSS clear property set by the align parameter, which is not typically needed. Options are left, right, both, or none. The defaults are left when align=left, right when align=right, none when align=center, and left when align=none. Use "none" to allow other floating elements to float next to the table of contents, and "both" to force the table of contents to have nothing next to it.

Chuỗi dàitùy chọn
Primaryprimary

Set this to "false" if this ToC is not used as the primary ToC of a page. This makes sure that the title of this ToC does not show up in the primary ToC. A side effect of this is the disappearing of the show/hide toggle.

Chuỗi dàitùy chọn

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