Elite Dangerous Field Manual:Page section resolution: Difference between revisions

Current answers. Practical procedures. Reliable reference.
Jump to navigation Jump to search
Document centralized article eyebrow section resolution
 
Document two-dimensional article eyebrow context resolution
Line 1: Line 1:
{{Article header|section=Operations|deck=How EDFM resolves article header eyebrows from page context instead of page-title duplication.}}
{{Article header|section=Operations|deck=How EDFM resolves article header eyebrows from page context instead of page-title duplication.}}


EDFM article pages use a centralized section resolver so the eyebrow above the page title answers '''where in EDFM the reader is''', while the H1 answers '''what page the reader is reading'''.
EDFM article pages use a centralized context resolver so the eyebrow above the page title answers '''where in EDFM the reader is''', while the H1 answers '''what page the reader is reading'''.


Normal output should look like:
The resolver tracks two independent dimensions:
 
* '''primary topic/section''' — what part of Elite Dangerous the page is about;
* '''optional content type''' — what kind of EDFM content it is, currently used for meaningful structural types such as '''Field Procedures'''.
 
Normal output looks like:


<pre>
<pre>
EDFM // Ships & Equipment
EDFM // Engineering
Frame Shift Drive
Felicity Farseer
</pre>
</pre>


rather than repeating the page title in the eyebrow.
For a procedure, output can include both dimensions:
 
<pre>
EDFM // Engineering / Field Procedures
Unlocking Broo Tarquin
</pre>


== Normal author workflow ==
== Normal author workflow ==
Line 20: Line 30:
</pre>
</pre>


Do not normally set an eyebrow manually. The header calls [[Module:PageContext]], which resolves the section automatically from structured data and central rules.
Field Procedure pages should normally use:


== Resolution order ==
<pre>
{{Field procedure|summary=Short task summary.}}
</pre>
 
Do not normally set an eyebrow manually. The header calls [[Module:PageContext]], which resolves the primary topic and optional content type from structured data and central rules.


The resolver checks, in order:
== Primary section resolution order ==


# '''Explicit override''' — <code>{{Article header|section=Combat}}</code>. Use only when the central resolver cannot reasonably infer the section.
# '''Explicit override''' — <code>{{Article header|section=Combat}}</code> or <code>topic=</code>.
# '''Exact central section mappings''' — section and hub pages such as [[Engineering]], [[Mining]], [[Powerplay]], and [[Ships and Equipment]].
# '''Structured procedure metadata''' — for example mining procedure records carry a topic such as <code>Mining</code>.
# '''Structured page/content type''' — existing canonical data/index pages, including Engineers, ship modules, mining datasets, and field-procedure datasets.
# '''Structured unlock target metadata''' — <code>Unlocking Name</code> resolves through the canonical Engineer data for <code>Name</code>.
# '''Page-family rules''' — conservative families such as <code>Unlocking ...</code> and <code>How to ...</code>, which resolve to [[Field Procedures]].
# '''Structured page/content type''' — existing canonical data/index pages, including Engineers, ship modules, and mining datasets.
# '''Limited topic-family rules''' — documented conservative title-family signals such as Guardian, Thargoid/Xeno, and AX naming.
# '''Exact central hub mappings''' — section and hub pages such as [[Engineering]], [[Mining]], [[Powerplay]], and [[Ships and Equipment]].
# '''Conservative topic-family rules''' — Guardian, Thargoid/Xeno, and AX naming rules.
# '''Small exceptional override map''' — currently empty.
# '''Fallback''' — unknown pages resolve to <code>Reference</code>.
# '''Fallback''' — unknown pages resolve to <code>Reference</code>.


== Structured type mappings ==
== Content type resolution order ==
 
# '''Explicit override''' — <code>{{Article header|type=Field Procedures}}</code>.
# '''Structured/shared content-type signal''' — mining procedure data or Engineer-unlock procedure target data.
# '''Centralized content-type family rule''' — conservative <code>How to ...</code> and <code>Unlocking ...</code> rules, after structured checks.
# '''Small exceptional override map''' — currently empty.
# '''None''' — normal articles do not receive a second segment.
 
If a content type exists but the primary section falls all the way back to <code>Reference</code>, [[Template:Article header]] suppresses the suffix unless a primary section was explicitly provided. This avoids noisy output such as <code>EDFM // Reference / Field Procedures</code> for unresolved procedure pages.


Structured page type mappings live in [[Module:Data/PageSections]]. Current mappings include:
== Structured integrations ==
 
Current integrations include:


* Engineer pages from <code>Module:Data/Engineers/index</code> → '''Engineering'''
* Engineer pages from <code>Module:Data/Engineers/index</code> → '''Engineering'''
* Engineer unlock procedure pages such as <code>Unlocking Broo Tarquin</code> → primary topic from the target Engineer record, content type '''Field Procedures'''
* Ship module pages from <code>Module:Data/ShipModules/index</code> and <code>Module:Data/Modules/index</code> → '''Ships & Equipment'''
* Ship module pages from <code>Module:Data/ShipModules/index</code> and <code>Module:Data/Modules/index</code> → '''Ships & Equipment'''
* Guardian module pages identified through the module index and Guardian naming → '''Guardian Technology'''
* Guardian module pages identified through the module index and Guardian naming → '''Guardian Technology'''
* Thargoid/Xeno/AX module pages identified through the module index and xeno naming → '''Thargoids'''
* Thargoid/Xeno/AX module pages identified through the module index and xeno naming → '''Thargoids'''
* Mining method/equipment/location/commodity datasets → '''Mining'''
* Mining method/equipment/location/commodity datasets → '''Mining'''
* Mining procedure dataset pages → '''Field Procedures'''
* Mining procedure records in <code>Module:Data/Procedures/Mining</code> primary topic from the record, content type '''Field Procedures'''


If EDFM adds a new canonical dataset, add a lightweight detector in [[Module:PageContext]] and map the resulting type in [[Module:Data/PageSections]]. Do not duplicate every individual page into a hand-maintained lookup table.
If EDFM adds a new canonical dataset, add a lightweight detector in [[Module:PageContext]] and map the resulting type in [[Module:Data/PageSections]]. Do not duplicate every individual page into a hand-maintained lookup table.


== Page-family rules ==
== Manual overrides ==


Page-family rules are centralized in [[Module:Data/PageSections]]. They are for predictable editorial families that may not have a complete structured dataset yet.
Use overrides only when a page is intentionally cross-topic or cannot be identified cleanly from data/rules:
 
Current examples:
 
* <code>Unlocking ...</code> → '''Field Procedures'''
* <code>How to ...</code> → '''Field Procedures'''
 
Keep these conservative. Do not add fuzzy keyword guessing.
 
== Exceptional overrides ==
 
Use an article-level override only when a page is intentionally cross-topic or cannot be identified cleanly from data/rules:


<pre>
<pre>
{{Article header
{{Article header
  |section=Operations
  |section=Engineering
|type=Field Procedures
  |deck=Optional one-line summary.
  |deck=Optional one-line summary.
}}
}}
Line 69: Line 86:


If many pages require overrides, improve the structured data or page-family rules instead.
If many pages require overrides, improve the structured data or page-family rules instead.
== Adding a primary section ==
# Add the section name to <code>exactSections</code> in [[Module:Data/PageSections]] for its hub page.
# If the section corresponds to a structured dataset, add/adjust a page type detector in [[Module:PageContext]].
# Map the new page type in <code>typeToSection</code>.
# Test with <code>{{#invoke:PageContext|getSection|page=Example Page}}</code> and a rendered live page.


== Public Lua interface ==
== Public Lua interface ==


[[Module:PageContext]] exposes:
[[Module:PageContext]] exposes semantic interfaces:


* <code>getPageType</code> — returns a semantic type such as <code>engineer</code> or <code>ship_module</code> where known.
* <code>getPrimarySection</code> — returns a plain section name such as <code>Engineering</code>.
* <code>getSection</code> — returns a plain section name such as <code>Ships & Equipment</code>.
* <code>getContentType</code> — returns a type such as <code>Field Procedures</code>, or blank for normal articles.
* <code>eyebrow</code> — returns rendered eyebrow text such as <code>EDFM // Ships & Equipment</code> for [[Template:Article header]].
* <code>getContext</code> — returns encoded context with <code>primarySection</code> and optional <code>contentType</code>.
* <code>getPageType</code> — returns an internal page type such as <code>engineer</code>, <code>ship_module</code>, or <code>field_procedure</code> where known.
* <code>eyebrow</code> — returns complete presentation text for compatibility/testing.


== Testing ==
== Testing ==
Line 90: Line 102:


<pre>
<pre>
{{#invoke:PageContext|getSection|page=Frame Shift Drive}}
{{#invoke:PageContext|getPrimarySection|page=Frame Shift Drive}}
{{#invoke:PageContext|getSection|page=Felicity Farseer}}
{{#invoke:PageContext|getPrimarySection|page=Felicity Farseer}}
{{#invoke:PageContext|getSection|page=Unlocking Broo Tarquin}}
{{#invoke:PageContext|getPrimarySection|page=Unlocking Broo Tarquin}}
{{#invoke:PageContext|getSection|page=Resolver Sandbox Unknown}}
{{#invoke:PageContext|getContentType|page=Unlocking Broo Tarquin}}
{{#invoke:PageContext|getSection|page=Frame Shift Drive|section=Combat}}
{{#invoke:PageContext|getContext|page=Unlocking Broo Tarquin}}
{{#invoke:PageContext|eyebrow|page=Resolver Sandbox Unknown}}
{{#invoke:PageContext|eyebrow|page=Frame Shift Drive|section=Combat|type=Field Procedures}}
</pre>
</pre>



Revision as of 21:43, 24 August 2026

EDFM // Operations

How EDFM resolves article header eyebrows from page context instead of page-title duplication.

EDFM article pages use a centralized context resolver so the eyebrow above the page title answers where in EDFM the reader is, while the H1 answers what page the reader is reading.

The resolver tracks two independent dimensions:

  • primary topic/section — what part of Elite Dangerous the page is about;
  • optional content type — what kind of EDFM content it is, currently used for meaningful structural types such as Field Procedures.

Normal output looks like:

EDFM // Engineering
Felicity Farseer

For a procedure, output can include both dimensions:

EDFM // Engineering / Field Procedures
Unlocking Broo Tarquin

Normal author workflow

Most pages should use:

{{Article header|deck=Optional one-line page summary.}}

Field Procedure pages should normally use:

{{Field procedure|summary=Short task summary.}}

Do not normally set an eyebrow manually. The header calls Module:PageContext, which resolves the primary topic and optional content type from structured data and central rules.

Primary section resolution order

  1. Explicit override

    EDFM // Combat

    or topic=.
  2. Structured procedure metadata — for example mining procedure records carry a topic such as Mining.
  3. Structured unlock target metadataUnlocking Name resolves through the canonical Engineer data for Name.
  4. Structured page/content type — existing canonical data/index pages, including Engineers, ship modules, and mining datasets.
  5. Exact central hub mappings — section and hub pages such as Engineering, Mining, Powerplay, and Ships and Equipment.
  6. Conservative topic-family rules — Guardian, Thargoid/Xeno, and AX naming rules.
  7. Small exceptional override map — currently empty.
  8. Fallback — unknown pages resolve to Reference.

Content type resolution order

  1. Explicit override

    EDFM // Reference

    .
  2. Structured/shared content-type signal — mining procedure data or Engineer-unlock procedure target data.
  3. Centralized content-type family rule — conservative How to ... and Unlocking ... rules, after structured checks.
  4. Small exceptional override map — currently empty.
  5. None — normal articles do not receive a second segment.

If a content type exists but the primary section falls all the way back to Reference, Template:Article header suppresses the suffix unless a primary section was explicitly provided. This avoids noisy output such as EDFM // Reference / Field Procedures for unresolved procedure pages.

Structured integrations

Current integrations include:

  • Engineer pages from Module:Data/Engineers/indexEngineering
  • Engineer unlock procedure pages such as Unlocking Broo Tarquin → primary topic from the target Engineer record, content type Field Procedures
  • Ship module pages from Module:Data/ShipModules/index and Module:Data/Modules/indexShips & Equipment
  • Guardian module pages identified through the module index and Guardian naming → Guardian Technology
  • Thargoid/Xeno/AX module pages identified through the module index and xeno naming → Thargoids
  • Mining method/equipment/location/commodity datasets → Mining
  • Mining procedure records in Module:Data/Procedures/Mining → primary topic from the record, content type Field Procedures

If EDFM adds a new canonical dataset, add a lightweight detector in Module:PageContext and map the resulting type in Module:Data/PageSections. Do not duplicate every individual page into a hand-maintained lookup table.

Manual overrides

Use overrides only when a page is intentionally cross-topic or cannot be identified cleanly from data/rules:

{{Article header
 |section=Engineering
 |type=Field Procedures
 |deck=Optional one-line summary.
}}

If many pages require overrides, improve the structured data or page-family rules instead.

Public Lua interface

Module:PageContext exposes semantic interfaces:

  • getPrimarySection — returns a plain section name such as Engineering.
  • getContentType — returns a type such as Field Procedures, or blank for normal articles.
  • getContext — returns encoded context with primarySection and optional contentType.
  • getPageType — returns an internal page type such as engineer, ship_module, or field_procedure where known.
  • eyebrow — returns complete presentation text for compatibility/testing.

Testing

Representative parser tests:

{{#invoke:PageContext|getPrimarySection|page=Frame Shift Drive}}
{{#invoke:PageContext|getPrimarySection|page=Felicity Farseer}}
{{#invoke:PageContext|getPrimarySection|page=Unlocking Broo Tarquin}}
{{#invoke:PageContext|getContentType|page=Unlocking Broo Tarquin}}
{{#invoke:PageContext|getContext|page=Unlocking Broo Tarquin}}
{{#invoke:PageContext|eyebrow|page=Resolver Sandbox Unknown}}
{{#invoke:PageContext|eyebrow|page=Frame Shift Drive|section=Combat|type=Field Procedures}}

Then verify rendered pages include exactly one visible eyebrow, retain the semantic H1, and do not show Lua/script errors.