Template:Article header: Difference between revisions
Jump to navigation
Jump to search
Remove obsolete manual article eyebrow parameter |
Render article eyebrow with optional content type |
||
| Line 1: | Line 1: | ||
<p class="edfm-eyebrow noexcerpt">{{#invoke:PageContext| | <p class="edfm-eyebrow noexcerpt">EDFM // {{#invoke:PageContext|getPrimarySection|page={{{page|}}}|section={{{section|}}}|topic={{{topic|}}}}}{{#if:{{#invoke:PageContext|getContentType|page={{{page|}}}|type={{{type|}}}|contentType={{{contentType|}}}}}| / {{#invoke:PageContext|getContentType|page={{{page|}}}|type={{{type|}}}|contentType={{{contentType|}}}}}}}</p>{{#if:{{{deck|}}}|<p class="edfm-deck">{{{deck|}}}</p>}}<noinclude> | ||
== Usage == | == Usage == | ||
Adds the EDFM | Adds the EDFM context eyebrow and/or a muted one-line description ("deck") near the article title. | ||
Normal pages should not provide an eyebrow manually. | Normal pages should not provide an eyebrow manually. [[Module:PageContext]] resolves two separate dimensions: | ||
* primary topic/section, such as <code>Engineering</code>, <code>Mining</code>, or <code>Ships & Equipment</code>; | |||
* optional content type, currently used for meaningful types such as <code>Field Procedures</code>. | |||
<pre> | <pre> | ||
{{Article header|deck=Optional one-line description shown under the title. | {{Article header | ||
|deck=Optional one-line description shown under the title. | |||
}} | }} | ||
</pre> | </pre> | ||
Use <code>section=</code> only for genuine exceptions that cannot be resolved from structured data or | Use <code>section=</code> and/or <code>type=</code> only for genuine exceptions that cannot be resolved from structured data or central rules: | ||
<pre> | <pre> | ||
{{Article header|section= | {{Article header | ||
|section=Engineering | |||
|type=Field Procedures | |||
|deck=Optional one-line description shown under the title. | |deck=Optional one-line description shown under the title. | ||
}} | }} | ||
</pre> | </pre> | ||
The rendered eyebrow is presentation text such as <code>EDFM // | The rendered eyebrow is presentation text such as <code>EDFM // Engineering / Field Procedures</code>. The real page title remains the semantic H1. [[MediaWiki:Common.js]] moves the eyebrow above the H1 visually when JavaScript is available; without JavaScript it remains in article content below the H1. | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 21:39, 24 August 2026
EDFM // Reference
Usage
Adds the EDFM context eyebrow and/or a muted one-line description ("deck") near the article title.
Normal pages should not provide an eyebrow manually. Module:PageContext resolves two separate dimensions:
- primary topic/section, such as
Engineering,Mining, orShips & Equipment; - optional content type, currently used for meaningful types such as
Field Procedures.
{{Article header
|deck=Optional one-line description shown under the title.
}}
Use section= and/or type= only for genuine exceptions that cannot be resolved from structured data or central rules:
{{Article header
|section=Engineering
|type=Field Procedures
|deck=Optional one-line description shown under the title.
}}
The rendered eyebrow is presentation text such as EDFM // Engineering / Field Procedures. The real page title remains the semantic H1. MediaWiki:Common.js moves the eyebrow above the H1 visually when JavaScript is available; without JavaScript it remains in article content below the H1.