Template:Excerpt

From Appropedia
Jump to navigation Jump to search

Template documentation[edit]

This template is used for reusing parts of pages in other pages. This practice has several advantages:

  • Reduces maintenance by avoiding duplicate content that must be updated multiple times
  • Improves content quality by encouraging editors to merge related content, rather than having multiple versions in various stages of development
  • Fosters collaboration by channeling contributors into one place, rather than working in parallel

This template extends the capabilities of the built-in normal transclusion.

Usage[edit source]

Basic usage[edit source]

  • {{Excerpt|Page title}} — Transclude the lead section (example)
  • {{Excerpt|Page title|Section title}} — Transclude a specific section, excluding any subsections (example)

Parameters[edit source]

  • 1 — Title of the page to transclude. Only required parameter. By default the lead section will be transcluded (example).
  • 2 — Title of the section to transclude (example).
  • fragment — Name of the fragment to transclude. Must be marked with <section begin=Name of the fragment/> and <section end=Name of the fragment/> in the transcluded page (example). Notice that this template provides other ways of targeting specific fragments of a page without having to resort to section tags.
  • only — Elements to transclude (example). By default all elements are transcluded.
    • only=file or only=files — Transclude only files
    • only=list or only=lists — Transclude only lists
    • only=table or only=tables — Transclude only tables
    • only=template or only=templates — Transclude only templates
    • only=paragraph or only=paragraphs — Transclude only paragraphs
  • paragraphs — Paragraphs to transclude. By default all paragraphs are transcluded.
    • paragraphs=0 — Transclude no paragraphs
    • paragraphs=1 — Transclude the first paragraph
    • paragraphs=2 — Transclude the second paragraph
    • paragraphs=1,3 — Transclude the first and third paragraphs
    • paragraphs=1-3 — Transclude the first, second and third paragraphs
    • paragraphs=1-3,5 — Transclude the first, second, third and fifth paragraphs
    • paragraphs=-1 — Transclude all paragraphs except the first
    • paragraphs=-2 — Transclude all paragraphs except the second
    • paragraphs=-1,3 — Transclude all paragraphs except the first and third
    • paragraphs=-1-3 — Transclude all paragraphs except the first, second and third
    • paragraphs=-1-3,5 — Transclude all paragraphs except the first, second, third and fifth
  • lists — Lists to transclude. By default all lists are transcluded. Same syntax as when transcluding paragraphs.
  • files — Files to transclude. By default all files are transcluded. Same syntax as when transcluding paragraphs, but also:
    • files=A.jpg — Transclude the file named 'A.jpg'
    • files=A.jpg, B.png, C.gif — Transclude the files named 'A.jpg', 'B.png' and 'C.gif'
    • files=.+%.png — Transclude all PNG files
    • files=-A.jpg — Transclude all files except the one named 'A.jpg'
    • files=-A.jpg, B.png, C.gif — Transclude all files except the ones named 'A.jpg', 'B.png' and 'C.gif'
    • files=-.+%.png — Transclude all non-PNG files
  • tables — Tables to transclude. By default all tables are transcluded. Same syntax as when transcluding paragraphs, but also:
    • tables=Stats2020 — Transclude the table with id 'Stats2020'
    • tables=Stats2020, Stats2019, Stats2018 — Transclude the tables with ids 'Stats2020', 'Stats2019' and 'Stats2018'
    • tables=-Stats2020 — Transclude all tables except the one with id 'Stats2020'
    • tables=-Stats2020, Stats2019, Stats2018 — Transclude all tables except the ones with ids 'Stats2020', 'Stats2019' and 'Stats2018'
  • templates — Templates to transclude. By default all templates are transcluded. Same syntax as when transcluding paragraphs, but also:
    • templates=Infobox — Transclude the template 'Infobox'
    • templates=Infobox, Navbox, Chart — Transclude the template 'Infobox', 'Navbox' and 'Chart'
    • templates=-Infobox — Transclude all templates except 'Infobox'
    • templates=-Infobox, Navbox, Chart — Transclude all templates except 'Infobox', 'Navbox' and 'Chart'
  • this — Change the initial text of the hatnote. For example, if the transcluded content is a gallery, you can set this=This gallery is so that the hatnote reads "This gallery is an excerpt from..." (example).
  • hat=no — Hide the hatnote "This section is an excerpt from..."
  • more=yes — Show a "Read more..." link at the end
  • bold=yes — Keep bold text.
  • quote=yes — Wrap the excerpt with <blockquote> tags.
  • inline=yes — Wrap the excerpt with <span> tags to use it inside other text.
  • references=no — Remove all references.
  • subsections=yes — Include subsections of the transcluded section. Notice that if the transclusion is done from a section level 3, and the transcluded subsections are level 3 too, then the transcluded subsections will show with the same hierarchy as the transcluding section, which is probably not desirable, so use with caution.

Replacing sections for excerpts[edit source]

How to replace a section for an excerpt.

Sections are often summaries of more precise subpages. Sometimes it's convenient to replace the content of such sections for excerpts of the subpages, after merging the original content of the section (if any) into the subpage. This improves both the subpage and the section, reduces maintenance, drives contributors to collaborate, etc.

An efficient way to proceed is:

  1. Open the section in one tab and the subpage in another.
  2. Edit both.
  3. Copy the text of the section and paste it below the lead section of the subpage.
  4. Delete repeated content and adjust using common sense.
  5. Save the changes in the subpage with an edit summary like: Bring content from [[Page]].
  6. Back to the section, delete all content and replace it for an excerpt of the subpage.
  7. Save the changes in the section with an edit summary like: Move content to [[Subpage]] and leave an excerpt.

Examples[edit source]

Lead section[edit source]

{{Excerpt|Rachel Carson}}
Rachel Carson, 1940
Fish & Wildlife Service employee photo

Rachel Louise Carson (May 27, 1907 – April 14, 1964) was an American marine biologist and conservationist whose book Silent Spring and other writings are credited with advancing the global environmental movement.

Carson began her career as a biologist in the U.S. Bureau of Fisheries, and became a full-time nature writer in the 1950s. Her widely praised 1951 bestseller The Sea Around Us won her a U.S. National Book Award,[1] recognition as a gifted writer, and financial security. Her next book, The Edge of the Sea, and the reissued version of her first book, Under the Sea Wind, were also bestsellers. That so-called sea trilogy explores the whole of ocean life from the shores to the surface to the depths.

Late in the 1950s Carson turned her attention to conservation, especially environmental problems she believed were caused by synthetic pesticides. The result was Silent Spring (1962), which brought environmental concerns to an unprecedented share of the American people. Although Silent Spring met with fierce opposition by chemical companies, it spurred a reversal in national pesticide policy, which led to a nationwide ban on DDT and other pesticides, and it inspired a grassroots environmental movement that led to the creation of the U.S. Environmental Protection Agency. Carson was posthumously awarded the Presidential Medal of Freedom by Jimmy Carter.
  1. "National Book Awards – 1952". National Book Foundation. Retrieved March 19, 2012.
    (With acceptance speech by Carson and essay by Neil Baldwin from the Awards 50-year anniversary publications.)

Specific section[edit source]

{{Excerpt|Rachel Carson|Early life and education}}

Rachel Carson was born on May 27, 1907, on a small family farm near Springdale, Pennsylvania, just up the Allegheny River from Pittsburgh. An avid reader, she also spent a lot of time exploring around her family's 65 acre farm. She began writing stories (often involving animals) at age eight, and had her first story published at age eleven. She especially enjoyed the St. Nicholas Magazine (which carried her first published stories), the works of Beatrix Potter, and the novels of Gene Stratton Porter, and in her teen years, Herman Melville, Joseph Conrad and Robert Louis Stevenson. The natural world, particularly the ocean, was the common thread of her favorite literature. Carson attended Springdale's small school through tenth grade, then completed high school in nearby Parnassus, Pennsylvania, graduating in 1925 at the top of her class of forty-five students.

At the Pennsylvania College for Women (today known as Chatham University), as in high school, Carson was somewhat of a loner. She originally studied English, but switched her major to biology in January 1928, though she continued contributing to the school's student newspaper and literary supplement. Though admitted to graduate standing at Johns Hopkins University in 1928, she was forced to remain at the Pennsylvania College for Women for her senior year due to financial difficulties; she graduated magna cum laude in 1929. After a summer course at the Marine Biological Laboratory, she continued her studies in zoology and genetics at Johns Hopkins in the fall of 1929.

After her first year of graduate school, Carson became a part-time student, taking an assistantship in Raymond Pearl's laboratory, where she worked with rats and Drosophila, to earn money for tuition. After false starts with pit vipers and squirrels, she completed a dissertation project on the embryonic development of the pronephros in fish. She earned a master's degree in zoology in June 1932. She had intended to continue for a doctorate, but in 1934 Carson was forced to leave Johns Hopkins to search for a full-time teaching position to help support her family. In 1935, her father died suddenly, leaving Carson to care for her aging mother and making the financial situation even more critical. At the urging of her undergraduate biology mentor Mary Scott Skinker, she settled for a temporary position with the U.S. Bureau of Fisheries, writing radio copy for a series of weekly educational broadcasts entitled "Romance Under the Waters". The series of fifty-two seven-minute programs focused on aquatic life and was intended to generate public interest in fish biology and in the work of the bureau—a task the several writers before Carson had not managed. Carson also began submitting articles on marine life in the Chesapeake Bay, based on her research for the series, to local newspapers and magazines.

Carson's supervisor, pleased with the success of the radio series, asked her to write the introduction to a public brochure about the fisheries bureau; he also worked to secure her the first full-time position that became available. Sitting for the civil service exam, she outscored all other applicants and in 1936 became only the second woman to be hired by the Bureau of Fisheries for a full-time, professional position, as a junior aquatic biologist.

Files only[edit source]

{{Excerpt|Rachel Carson|only=files|hat=no}}
lead-empty

Infobox only[edit source]

{{Excerpt|Rachel Carson|only=templates|templates=Infobox person|this=This infobox is}}
Rachel Carson
Rachel-Carson.jpg
Rachel Carson, 1940
Fish & Wildlife Service employee photo
Born Rachel Louise Carson
May 27, 1907(1907-05-27)
Springdale, Pennsylvania, U.S.
Died April 14, 1964(1964-04-14) (aged 56)
Silver Spring, Maryland, U.S.
Nationality American
Alma mater Chatham University,
Johns Hopkins University
Occupation Marine biologist, Writer, Environmentalist

No infobox[edit source]

{{Excerpt|Rachel Carson|templates=-Infobox person}}
Rachel Carson, 1940
Fish & Wildlife Service employee photo

Rachel Louise Carson (May 27, 1907 – April 14, 1964) was an American marine biologist and conservationist whose book Silent Spring and other writings are credited with advancing the global environmental movement.

Carson began her career as a biologist in the U.S. Bureau of Fisheries, and became a full-time nature writer in the 1950s. Her widely praised 1951 bestseller The Sea Around Us won her a U.S. National Book Award,[1] recognition as a gifted writer, and financial security. Her next book, The Edge of the Sea, and the reissued version of her first book, Under the Sea Wind, were also bestsellers. That so-called sea trilogy explores the whole of ocean life from the shores to the surface to the depths.

Late in the 1950s Carson turned her attention to conservation, especially environmental problems she believed were caused by synthetic pesticides. The result was Silent Spring (1962), which brought environmental concerns to an unprecedented share of the American people. Although Silent Spring met with fierce opposition by chemical companies, it spurred a reversal in national pesticide policy, which led to a nationwide ban on DDT and other pesticides, and it inspired a grassroots environmental movement that led to the creation of the U.S. Environmental Protection Agency. Carson was posthumously awarded the Presidential Medal of Freedom by Jimmy Carter.

Portal[edit source]

{{Excerpt|Rachel Carson|files=1|references=0|hat=no|more=yes}}
Rachel Carson, 1940
Fish & Wildlife Service employee photo

Rachel Louise Carson (May 27, 1907 – April 14, 1964) was an American marine biologist and conservationist whose book Silent Spring and other writings are credited with advancing the global environmental movement.

Carson began her career as a biologist in the U.S. Bureau of Fisheries, and became a full-time nature writer in the 1950s. Her widely praised 1951 bestseller The Sea Around Us won her a U.S. National Book Award,[1] recognition as a gifted writer, and financial security. Her next book, The Edge of the Sea, and the reissued version of her first book, Under the Sea Wind, were also bestsellers. That so-called sea trilogy explores the whole of ocean life from the shores to the surface to the depths.

Late in the 1950s Carson turned her attention to conservation, especially environmental problems she believed were caused by synthetic pesticides. The result was Silent Spring (1962), which brought environmental concerns to an unprecedented share of the American people. Although Silent Spring met with fierce opposition by chemical companies, it spurred a reversal in national pesticide policy, which led to a nationwide ban on DDT and other pesticides, and it inspired a grassroots environmental movement that led to the creation of the U.S. Environmental Protection Agency. Carson was posthumously awarded the Presidential Medal of Freedom by Jimmy Carter.

See also[edit source]

  1. 1.0 1.1 "National Book Awards – 1952". National Book Foundation. Retrieved March 19, 2012.
    (With acceptance speech by Carson and essay by Neil Baldwin from the Awards 50-year anniversary publications.)