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

Usage

  • To transclude the lead section of an article, use {{Excerpt|Title of the article}}
  • To transclude a specific section (excluding the title but including any subsections) use {{Excerpt|Title of the article|Title of the section}}
  • To transclude an arbitrary piece of content, first wrap it using <section begin=Name of the fragment /> and <section end=Name of the fragment />, then transclude it using {{Excerpt|Title of the article|fragment=Name of the fragment}}

Problems with references

  • Sometimes the transcluded content may contain a reference with the same name as a reference in the transcluding article. This will produce a "duplicate reference name" error. To fix it, simply rename one of the references (it doesn't matter which).
  • Sometimes the transcluded content may contain a reference whose body is somewhere else in the transcluded article. This will produce an "unknown reference" error. To fix it, simply move the body of the reference to the transcluded content.

Replacing Template:Main

Excerpts can ویکی‌پدیا:«از همه مقررات چشم‌پوشی کنید» یعنی چه؟ 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 excerpt

Examples

Lead section

{{Excerpt|Science}}

خطای لوآ: پودمان:TNT:158: Missing JsonConfig extension, or not properly configured; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Module:Excerpt.tab.

See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates.


Specific section

{{Excerpt|List of continents by population|South America}}
{{#lsth:List of continents by population|South America}}


Specific fragment

{{Excerpt|2020 Republican Party presidential primaries|fragment=declared}}
{{#lst:2020 Republican Party presidential primaries|declared}}


Notes

References


See also

Template data

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

پارامترهای الگو

پارامترتوضیحاتنوعوضعیت
Article1 article

Title of the article to transclude

مثال
Science
نام صفحهضروری
Section2 section

Title of the section to transclude

مثال
History
رشتهاختیاری
Fragmentfragment

Name of the fragment to transclude

مثال
definition
رشتهاختیاری