Bản mẫu:Military navigation

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]

Bản mẫu điều hướng[sửa | sửa mã nguồn]

Sự đa dạng các bản mẫu điều hướng được duy trì bởi WikiProject lịch sử quân sự đều được dự định thực hiện thông qua một mẫu cơ sở duy nhất, kết hợp các dự án kiểu bản mẫu chung với định dạng hộp điều hướng tiêu chuẩn. Điều này là cần thiết chủ yếu để cho phép nhiều bản mẫu như vậy được xếp chồng lên nhau với nhau hoặc với Bản mẫu hộp thông tin trình bày sự xuất hiện của một khối liên tục; nó cũng có lợi cho việc cung cấp một diện mạo nhất quán cho toàn bộ tập hợp các bài viết trong phạm vi của chúng tôi.

Bất kỳ bản mẫu điều hướng liên quan đến quân sự nên được tạo bằng cách sử dụng {{military navigation}} làm bản mẫu cơ sở, như được hiển thị dưới đây:

{{Military navigation
| name = 
| raw_name =
| state = 
| style = 
| title = 
| image = 
| imageleft = 
| odd_color = 
| even_color = 
| above = 
| listclass = 

| group1 = 
| list1 = 

| group2 = 
| list2 = 

| group3 = 
| list3 = 
...
| group30 = 
| list30 = 

| below = 
}}
name
The actual page name (i.e. "XYZ" for Bản mẫu:XYZ) of the newly-created template.
raw_name
Use instead of "name" to omit the  V · T · E  links from the title bar.
title
The displayed title of the navigation box.
listclass
Optional – but typically hlist, to format content as horizontal lists. In the case of hlists in above or below fields, set bodyclass=hlist, instead.
style
Optional – an alternative style for the template; this may be set to "wide" to produce a full-width box. The alternative style should be used sparingly; it is intended that the majority of navigational templates will use the default style (in the wild, "wide" has become quite common). The above example template formatted with style=wide is shown below:
state
Optional – may be set to "collapsed" to force the template to render in its closed state by default.
odd_color/even_color
Optional – the stripe colors for alternating listN items to use. These parameters should be used sparingly; in the absence of a good reason to do otherwise, templates should use the default stripe colors.
groupN/listN
The body of the navigation box, consisting of successive horizontal blocks of content (the listN fields) with optional labels (the corresponding groupN fields). Please see the documentation for {{navbox}} for more details on the different layouts possible.
above
Optional – the sub-header of the navigation box; please see the documentation for {{navbox}} for more details on the resulting layout when this is used.
below
Optional – the footer of the navigation box; please see the documentation for {{navbox}} for more details on the resulting layout when this is used.
image
Optional – an image to be displayed at the right of the box, given in the form [[Image:Example.jpg|100px]]. This parameter should be used sparingly, and typically only in conjunction with the full-width template style.
imageleft
Optional – an image to be displayed at the left of the box, given in the form [[Image:Example.jpg|100px]]. This parameter should be used sparingly, and typically only in conjunction with the full-width template style.

Vấn đề Common với bản mẫu điều hướng[sửa | sửa mã nguồn]

There are several known issues with the current navigation template design that editors should be aware of:

Shifted header wrapping
A long header used in a narrow navigation template may wrap incorrectly, with the second line being indented further than necessary. A workaround is possible by adding a <br /> tag between the words where the wrapping is to occur. This should be done to separate link-text to the right of the 'pipe' (|), as follows: [[Article title|Article <br /> title]]. An alternative method is to use {{allow wrap}} for the link-text as follows: [[A very long article title|{{allow wrap|A very long article title}}]], which allows the browser to break as-needed.
Stretching or overflowed boxes
A very long header formatted as a single link may cause a template to stretch beyond its normal width, or the whole link to extend off too far to the right. A workaround is possible by breaking the header onto multiple lines, as shown above.

Thể loại theo dõi[sửa | sửa mã nguồn]