Template:Excerpt

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]

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

Using excerpts we can:

  • Reduce maintenance, by having to update equal content only once
  • Reduce incoherence and outdated content throughout the encyclopedia
  • Funnel and foster collaboration, instead of working in parallel
  • Improve the quality of content, by merging only the best of every section covering the same topic

Don't Repeat Yourself is an important software and knowledge management principle. Templates, Wikimedia Commons and Wikidata are only some examples of this principle being applied.

Usage[edit]

This template only requires one parameter: the title of the article we want to transclude. If no other parameter is given, the lead section of the article will be transcluded. Like so:

{{Excerpt|Some article}}

If you want to transclude a specific section, use the following:

{{Excerpt|Some article|Some section}}

Excerpts can often be used in place of {{Main}}, after merging the content of the section into the main article. Doing so usually improves the main article as well as the section.

An efficient way to proceed is:

  1. Open the article with {{Main}} in one tab, and the main article in another (or in two screens, if you have)
  2. Edit both
  3. Copy the text of the section with {{Main}}, and paste it below the introduction of the main article
  4. Delete repeated content and adjust with common sense
  5. Save the changes in the main article with an edit summary like: Merge content from [[Some article]]
  6. Back to the section with {{Main}}, delete all content and replace it for an excerpt
  7. Save the changes in the section with an edit summary like: Merge content into [[Main article]] and leave an [[Template:Excerpt|excerpt]]

Details[edit]

Sometimes a reference in the transcluded article has the same name as another reference in the transcluding article. This may cause a reference name conflict and error. To solve this, simply rename one of the references.

In other cases, the body of the reference may be in some other part of the transcluded article, and the lead section may only be citing it, in which case the transcluding article will show an "unknown reference" error. To solve this, simply move the body of the reference to the section to be transcluded. If the original article from which you are transcluding consistently uses list-defined references (all reference citations are collected at the bottom of the article), the reference material should be left where it is in that article, and a copy of the reference citation put into the references section of the transcluding article.

Other, perhaps minor, reasons for using excerpts are:

  • Improve the user experience, by making sections self-understandable, since most users skip directly to the sections they want
  • Reduce the total size of articles in the database
  • Make credit easier to track

See also[edit]

Template data[edit]

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

Template parameters

ParameterDescriptionTypeStatus
Article1 article

Title of the article to transclude

Example
Logic
Pagerequired
Section2 section

Section of the article to transclude

Example
History
Stringoptional
Fragmentfragment

Name of the fragment to transclude

Example
writings
Stringoptional
Referencesreferences

Transclude the references?

Default
true
Example
false
Booleanoptional