From PZwiki
Jump to: navigation, search
[view] [edit] [history] [purge] Template documentation
Template used at the top of a page for navigation.


<includeonly><div style="clear: both; border: 1px solid #000; background: #{{#ifeq:{{{1|}}}|Community|EBF3F4|F4F3EB}}">
 <div class="tp-header" style="padding: 6px; background: #{{#ifeq:{{{1|}}}|Community|185893|68191B}}; border-bottom: 1px solid #000; color: #fff;">
  <span style="padding: 9px 0px; border-right:1px solid #000; padding-right: 9px; color: #fff;">'''Navigation:'''</span><!--
--><span style="padding: 9px">[[:Category:Main|<span style="color: #{{#ifeq:{{{1|}}}|Community|C1D6DD|DDD6C1}};>Main Index</span>]]</span>{{#if:{{{1|}}}|<small>></small><!--
--><span style="padding: 9px">[[:Category:{{{1}}}{{!}}<span style="color: #{{#ifeq:{{{1|}}}|Community|C1D6DD|DDD6C1}};>{{{1}}}</span>]]</span>|}}{{#if:{{{2|}}}|<small>></small><!--
--><span style="padding: 9px">[[:Category:{{{2}}}{{!}}<span style="color: #{{#ifeq:{{{1|}}}|Community|C1D6DD|DDD6C1}};>{{{2}}}</span>]]</span>|}}{{#if:{{{3|}}}|<small>></small><!--
--><span style="padding: 9px">[[:Category:{{{3}}}{{!}}<span style="color: #{{#ifeq:{{{1|}}}|Community|C1D6DD|DDD6C1}};>{{{3}}}</span>]]</span>|}}{{#if:{{{4|}}}|<small>></small><!--
--><span style="padding: 9px">[[:Category:{{{4}}}{{!}}<span style="color: #{{#ifeq:{{{1|}}}|Community|C1D6DD|DDD6C1}};>{{{4}}}</span>]]</span>|}}{{#if:{{{5|}}}|<small>></small><!--
--><span style="padding: 9px">[[:Category:{{{5}}}{{!}}<span style="color: #{{#ifeq:{{{1|}}}|Community|C1D6DD|DDD6C1}};>{{{5}}}</span>]]</span>|}}{{#if:{{{6|}}}|<small>></small><!--
--><span style="padding: 9px">[[:Category:{{{6}}}{{!}}<span style="color: #{{#ifeq:{{{1|}}}|Community|C1D6DD|DDD6C1}};>{{{6}}}</span>]]</span>|}}<small>></small><!--
--><span style="padding: 9px">{{#ifeq:{{NAMESPACE}}|Category|{{#if:{{{pagename|}}}|[[:{{FULLPAGENAME}}|<span style="color: #fff;>{{{pagename}}}</span>]]|[[:{{FULLPAGENAME}}{{!}}{{SUBPAGENAME}}]]}}|{{#if:{{{pagename|}}}|[[{{FULLPAGENAME}}|<span style="color: #fff;>{{{pagename}}}</span>]]|[[{{FULLPAGENAME}}{{!}}{{SUBPAGENAME}}]]}}}}</span><!--
--><span style="float:right; padding-right: 5px; color: #fff">{{#if: {{{hidever|}}}||'''Page Updated:''' [[Version history|<span style="color: #{{#ifeq:{{{1|}}}|Community|C1D6DD|DDD6C1}};>{{{version|Unknown Version}}}{{#if:{{{version|}}}|{{#if:{{{incver|}}}|.{{{incver|}}} }} }}</span>]]}}</span></div>
  <div style="margin: 0; padding: 10px;">
   {{#if: {{{hidecat|}}}| |
   {{#if: {{{hidever|}}}||[[Category:{{{version|Unknown Version}}}]]}}


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

{{header|First-level category|Second-level category|Third-level category|etc.|version=Version 40|incver=43}}
  • Navigational Categories - The name of categories leading up to the item/page in question, starting from the main index (automatically included.) See Category:Main for a list of categories that branch off of the main index. A category that is included in the template will add a [[category:name]] to the page automatically. Up to 6 categories between the index and current page can be used.
  • type (optional) - The page's content type. Used to colorize a page's background. Currently accepts Food or Drink for green and Neutral for grey. Omitting/Using anything else results in a blue color.
    There are currently 2 colour variants: blue and red. The colour is defined by the category in position 1 (after the main index).
  • 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.
  • incver - The incremental (minor) PZ version this page's content is up to date to. Used to avoid creating many categories for a single release version.
  • hidecat (optional) - If present in the template (no matter the contents) the template will not automatically create categories.
  • hidever (optional) - If present in the template (no matter the contents) the page version box will be hidden. Version category is also removed. version and incver may be omitted if hidever is used.


{{header|Community|Modding|version=Version 40|incver=43}}

Will produce:

A whole page's worth of content in here.


{{header|The Game World|Items|Weapons|hidever=true}}

Will produce:

Another page of content in here.


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 anyways. If in the future this messes up pages it will change.

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 different 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.
Documentation transcluded from Template:Header/doc.
Editors can experiment in this template's sandbox (create)