Template:Indexing: Difference between revisions

Content deleted Content added
Deploy Template:Indexing (H6 heading + Has topic subobject)
Deploy Template:Indexing (H6 heading + Has topic subobject)
Line 6:
|Has topic={{#if:{{{7|}}}|[[ID:{{{7}}}]]|}}
|Has topic={{#if:{{{8|}}}|[[ID:{{{8}}}]]|}}
|Has descriptionsummary={{{2|}}}
|Has indexed heading={{{1|}}}
|Has unit kind={{{kind|}}}
|Has order={{{order|}}}
|Has figure={{#if:{{{f1|}}}|{{{f1}}} = {{{v1|}}}|}}
|Has figure={{#if:{{{f2|}}}|{{{f2}}} = {{{v2|}}}|}}
Line 16 ⟶ 17:
|Has figure={{#if:{{{f6|}}}|{{{f6}}} = {{{v6|}}}|}}
}}====== {{{1}}} ======
{{#if:{{{f1|}}}|<divtable class="unitkey-figures"><div class="unit-figures-head"caption>Key figures</divcaption>{{#if:{{{f1|}}}|<div class="unit-figures-row"tr><span class="unit-figures-label"th>{{{f1}}}</spanth><span class="unit-figures-value"td>{{{v1|}}}</spantd></divtr>}}{{#if:{{{f2|}}}|<div class="unit-figures-row"tr><span class="unit-figures-label"th>{{{f2}}}</spanth><span class="unit-figures-value"td>{{{v2|}}}</spantd></divtr>}}{{#if:{{{f3|}}}|<div class="unit-figures-row"tr><span class="unit-figures-label"th>{{{f3}}}</spanth><span class="unit-figures-value"td>{{{v3|}}}</spantd></divtr>}}{{#if:{{{f4|}}}|<div class="unit-figures-row"tr><span class="unit-figures-label"th>{{{f4}}}</spanth><span class="unit-figures-value"td>{{{v4|}}}</spantd></divtr>}}{{#if:{{{f5|}}}|<div class="unit-figures-row"tr><span class="unit-figures-label"th>{{{f5}}}</spanth><span class="unit-figures-value"td>{{{v5|}}}</spantd></divtr>}}{{#if:{{{f6|}}}|<div class="unit-figures-row"tr><span class="unit-figures-label"th>{{{f6}}}</spanth><span class="unit-figures-value"td>{{{v6|}}}</spantd></divtr>}}</divtable>}}</includeonly><noinclude>
This is the section-indexing template. A doc_archive content unit is written as:
 
<code>{{Indexing|heading|descriptionsummary|topic_id_1|topic_id_2|…|kind=prose|order=7|f1=Employees|v1=1,014611 (Dec 31, 2025)}}</code>
 
It renders a level-6 heading (<code>====== heading ======</code>) AND records one
SMW subobject linking <code>Has topic = [[ID:<id>]]</code> per topic id (page-links,
so <code>[[Has topic::ID:<id>]]</code> and Special:WhatLinksHere resolve back to the
section), plus <code>Has descriptionsummary</code>, <code>Has indexed heading</code> and,
<code>Has unit kind</code> (named parameter <code>kind</code>: <code>prose</code> or
<code>table</code>, derived by the indexer from the unit body — retrieval filters
on it: slide building wants tables, answer drafting wants prose). and
<code>Has order</code> (named parameter <code>order</code>: the unit's 1-based
position in the document, so the Pagemap lists sections in source order).
 
Key figures: up to 6 label/value pairs (<code>f1</code>/<code>v1</code> …
<code>f6</code>/<code>v6</code>), PROSE units only — factsthe thatunit's livekey onlyfacts in thestated
narrativeas numbers or named entities (headcounts, foundingamounts, dates, percentages, business mix). Each pair renders a row in a
mix). Each pair renders a row in a right-floating <code>unitkey-figures</code> card (styled by Common.css §12) after thebox
(an infobox-style card, styled by Common.css §12) after the heading, and stores a
heading, and stores a <code>Has figure</code> Text fact ("label = value") on the same subobject. The
same subobject. The indexer verifies every digit-bearing value verbatim against the unit body before
the unit body before writing; a label without a value (or vice versa) is ignored.
 
Up to 6 topic ids (positional args 3–8). Ids come from the <code>section_topics</code>