Edge Rewrite
// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21ea944ff344f87

Jump to content

Template:ExcerptHeaderLevel/doc

From Wikipedia, the free encyclopedia

Transcludes a section from another page and adjusts heading levels in the excerpt.

Parameters

[edit]
  • 1 or page – source page
  • 2 or section – exact section heading to transclude
  • top-header-level – absolute level for the inserted top heading
    • child headings are adjusted automatically relative to it
    • if set, shift, higher, and lower are ignored
  • shift / higher / lower – relative heading adjustment when top-header-level is not set
  • include-top-header – whether to include the transcluded section heading
    • default: yes

Examples

[edit]

See it in action at Operation Salvo#Protests.

Basic transclusion

[edit]
{{ExcerptHeaderLevel|Example article|History}}

Transcludes the section with its default heading behavior.

Absolute top heading level

[edit]
{{ExcerptHeaderLevel|Example article|History|top-header-level=2}}

Sets the inserted section heading to level 2 and adjusts child headings relative to it.

Omit the transcluded section heading

[edit]
{{ExcerptHeaderLevel|Example article|History|include-top-header=no}}

Transcludes only the section contents, without the section heading itself.

Lower all headings by 1

[edit]
{{ExcerptHeaderLevel|Example article|History|lower=1}}

Useful when the excerpt needs to sit one level deeper in the destination page.

Raise all headings by 1

[edit]
{{ExcerptHeaderLevel|Example article|History|higher=1}}

Useful when the excerpted headings are too deep relative to the destination page.

Signed shift

[edit]
{{ExcerptHeaderLevel|Example article|History|shift=1}}

Equivalent to:

{{ExcerptHeaderLevel|Example article|History|lower=1}}

And:

{{ExcerptHeaderLevel|Example article|History|shift=-1}}

Equivalent to:

{{ExcerptHeaderLevel|Example article|History|higher=1}}

Include top header at a fixed level

[edit]
{{ExcerptHeaderLevel
|Government attacks on journalists during the Trump presidencies
|2016–2017: Transition between Barack Obama and Donald Trump's presidencies
|top-header-level=2
|include-top-header=yes
}}

Useful when the destination page needs the transcluded section heading at a specific level, with all child headings following automatically.

Relative shifting without top-header-level

[edit]
{{ExcerptHeaderLevel
|Government attacks on journalists during the Trump presidencies
|2016–2017: Transition between Barack Obama and Donald Trump's presidencies
|lower=1
|include-top-header=yes
}}

Useful when you just want to shift the excerpted heading structure down by one level without setting an absolute top heading level.

See also

[edit]

TemplateData

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:ExcerptHeaderLevel in articles based on its TemplateData.

TemplateData for ExcerptHeaderLevel

Transcludes a section from another page and adjusts heading levels, with optional inclusion of the transcluded section heading.

Template parameters

ParameterDescriptionTypeStatus
Page1

Source page name

Page namerequired
Section2

Exact section heading to transclude

Stringrequired
Pagepage

Source page name

Page nameoptional
Sectionsection

Exact section heading to transclude

Stringoptional
Top header leveltop-header-level

Absolute level for the inserted top heading. Child headings are adjusted automatically relative to it.

Numberoptional
Shiftshift

Relative heading offset. Ignored if top-header-level is set.

Numberoptional
Raise headingshigher

Raise headings by this many levels. Ignored if top-header-level is set.

Numberoptional
Lower headingslower

Lower headings by this many levels. Ignored if top-header-level is set.

Numberoptional
Include top headerinclude-top-header

Whether to include the transcluded section heading.

Suggested values
yes no
Stringoptional