Template:Excerpt

Error messages[edit]

If an error is detected, an error message will appear in the article in place of the expected transcluded content:

  • No page given – No page was passed to the template
  • Title X is not valid – The title passed is not valid (contains forbidden characters such as < or >)
  • Page X not found – The page passed does not exist, or the page is a redirect and the target page was not found
  • Lead section is empty – The page exists, but cannot excerpt from non-existent lead
  • Section X not found – The page exists, but cannot excerpt the desired section because either:
    • The given section does not exist. This may occur if the source page section is removed or renamed. To help mitigate this, see MOS:BROKENSECTIONLINKS.
    • The given section exists, but is excluded from transclusion by one of the inclusion control tags.
  • Section X is empty – The given section exists, but is empty
  • Template loop detected – The excerpted section contains itself an excerpt. While this is not strictly a template loop, the software considers it so. To fix it, skip the intermediate excerpt (example).

See also[edit]

Template data[edit]

This template is used for transcluding part of an article into another article.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Article1 article page

Name of the article or page to transclude

Example
Science
Page namerequired
Section2 section fragment

Name of the section or <section> tag to transclude

Example
History
Stringoptional
Onlyonly

Transclude only this kind of element

Example
table
Stringoptional
Paragraphsparagraphs paragraph

Paragraphs to transclude

Example
1-3,5
Stringoptional
Filesfiles file

Files to transclude

Default
1
Example
1-3,5
Stringoptional
Tablestables table

Tables to transclude

Example
Stats2020
Stringoptional
Listslists list

Lists to transclude

Example
1
Stringoptional
Templatestemplates template

Templates to transclude

Example
Infobox person
Stringoptional
Referencesreferences

Whether to transclude the references

Example
no
Booleanoptional
Subsectionssubsections

Whether to transclude the subsections of the requested section

Example
yes
Booleanoptional
Hatnotehat

Whether to include the hatnote

Default
yes
Example
no
Booleanoptional
Boldbold

Whether to preserve bold text

Default
yes
Example
no
Booleanoptional
Wikilinkslinks

Whether to preserve wikilinks

Default
yes
Example
no
Booleanoptional
Quotequote

Wraps the excerpt in <blockquote> tags

Default
no
Example
yes
Booleanoptional
Thisthis

Change the initial text of the hatnote

Example
This gallery is
Stringoptional
Display titledisplaytitle

Change the text of the link in the hatnote

Stringoptional
Inlineinline

Remove the hatnote and <div> tags around the excerpt, to use it inside other text

Default
no
Example
yes
Booleanoptional
Only free filesonlyfreefiles

Enable transclusion of non-free files

Default
no
Example
yes
Booleanoptional
Brief datesbriefdates

Abbreviate birth and death information to (YYYY-YYYY) format

Default
no
Example
yes
Booleanoptional
Classclass

Additional CSS class

Example
noprint
Stringoptional

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search