Template:Header

From PZwiki
Revision as of 06:24, 14 January 2024 by Vaileasys (talk | contribs) (remove category link)
Lock-locked.png
This page has been put into protection by a PZwiki administrator.
Only users in the sysop user group may edit this page.
Notebook.pngTemplate Documentation

This template is used at the top of pages, listing all the categories leading up to the page it is on. It also contains the version the article was updated to, adding it to a version category for maintenance.

Usage

This template must be placed at the top of a page, under the {{Languages}} template, if it is present.

{{Header|First-level category|Second-level category|Third-level category|etc.|version=Version 41|incver=78.16}}

Parameters

1 - 6
The name of each categories leading up to the item/page, omitting Category:. This will add the page to the last category. Will add the page to the top category of the wiki if all parameters are empty.
version
The major Project Zomboid version this page's content is up to date to. When updating a page use Version (#). The contents of this parameter will also be categorized on the page. Will add the page to Unknown Version if empty.
incver
The incremental (minor) PZ version this page's content is up to date to.
hidebody
If not empty the template will not display the body (background), only displaying the header.
hidever
If not empty the template will not display the version number.
hidecat
If not empty the template will not add the page to the categories defined in 1 to 6.

Background color

The background color is automatically set based on the category in the first anonymous parameter (1).

There are currently 2 color schemes, known as: Zomboid red and Community blue. These are taken from the {{Infobox nc}} template.

Community categories

The following categories will result in the blue color scheme.

Translating

Many parts of this template are auto-translated using the {{Translation}} template or {{DISPLAYTITLE}} magic word. It is not necessary to translate this template to a language subpage, it is sufficient to just use {{Header}}.

Translation template

Static elements can be translated in the {{Translation}} template. If they're not already present, include and translate the below. Translations go after the equals (=) sign.

| Navigation = 
| Page updated = 
| Unknown Version =

DISPLAYTITLE magic word

The name of a page (known as the display title) can be customized using the {{DISPLAYTITLE}} magic word. This template will automatically display the name of a category/page with a custom display title.

Ensure you've added the language code subpage.

Examples

{{Header|Modding|hidever=true}}

Will produce:

Top category tree Navigation:

[[:Category:Modding|Template:Check title]] > Template:Check title

A whole page's worth of content in here.

And

{{Header|The Game World|Items|Weapons|version=Version 41|incver=78.16}}

Will produce:

Top category tree Navigation:

[[:Category:The Game World|Template:Check title]] > [[:Category:Items|Template:Check title]] > [[:Category:Weapons|Template:Check title]] > Template:Check title

Another page of content in here.

FAQs

Q: How to translate this template?
A: To translate the template, don't create a language version, just use the {{Header}} and not {{Header/xx}} and translate the respective words in Template:Translation for your language.

Q: Why is there a </div> missing in the template?
A: This is intentional. It means no matter what is added to the page in the future, it will be included in the template's background. It automatically stops when it reaches the footer anyway. If the background is not reaching the bottom of the page, add the {{Clear}} template to the bottom of the page.

Q: Why do I need to use version and incver when adding the page's version?
A: The reason for this is to avoid having several categories for a single release version. For example, without both we would end up with a Category:Version 36, Category:Version 36.1, 36.2, 36.3… You see where this is going.

Updated 23/10/2023. incver now included in version category.

See also

Editors can experiment in this template's sandbox.