Template:Excerpt

From Caves of Qud Wiki
Jump to navigation Jump to search

Allows you to include an excerpt from a section on another page. Also adds the Pages with excerpts category.

Example: {{Excerpt|Quickness#Action Cost Modifiers}}

Limitations

  • Note that if the section linked to includes spaces, such as Quickness#Action_Cost_Modifiers, you must omit the underscores to avoid causing a parsing error with this template.
  • This template can only be used on sections with a section header level of 2 or deeper (i.e. ==, ===, etc)
  • Sometimes you might need to update the section you are excerpting to avoid using {{name}} templates or similar - since they will resolve to the current page instead of the page from which you're excerpting content.

Warnings

  • If the excerpted section title changes or is removed from the source page, the excerpt will no longer work. Consider adding an HTML comment to the page being excerpted so that editors of that page in the future know not to change the title of the section. For example:
    <!-- This section is excerpted in other places using Template:Excerpt.
    Please do not change the section title without updating the other pages that excerpt it. -->
  • This template will include everything either until another section header is reached or the end of the page is reached. As a result, it can include: navboxes, categories, sub-sections with a lower heading level, as well as other content depending on the location of the excerpted section. To avoid this, you can wrap any subsequent content (such as a navbox or category) inside <noinclude></noinclude> tags on the page from which you are excerpting content.