Template:Auto parents/doc

From Wikisource
Jump to navigation Jump to search

Usage[edit]

This template provides a sequences of parent links to a subpage, suitable for use in the header of the article, so that the intervening parent hierarchy doesn't need to be manually entered.

Thus, a title such as "Ackermann’s Repository of Arts/Series 1/Volume 1/February 1809/Chinese Imperial Edict" will produce the following link sequence: Ackermann’s Repository of Arts, Series 1, Volume 1, February 1809

The last subpage level is removed (this is assumed to be the article's own name) and then each higher level is separately linked. The number of levels is determined automatically.

Parameters[edit]

  • display: The top level work's display name, if not the same as the page title. For example Nature (journal) would use display = Nature.
  • page: An override for the current page's name. Can be used for testing and documentation, should not be needed in normal usage. If not given, the current page name is used.
  • no links: Use if none of the page names should be links.
  • existing links: Use if the page names should only be links if the pages exist.

Examples[edit]

Basic usage with no parameters:

With a display override for the top level work:

Example

Assuming the template is used on the page Ackermann’s Repository of Arts/Series 1/Volume 1/February 1809/Chinese Imperial Edict:

{{auto parents
 | display = Display override
}}

Display override, Series 1, Volume 1

Explicitly setting the page to be Ackermann’s Repository of Arts/Series 1/Volume 1/February 1809/Chinese Imperial Edict:

Example

{{auto parents|page=Ackermann’s Repository of Arts/Series 1/Volume 1/February 1809/Chinese Imperial Edict}}

Ackermann’s Repository of Arts, Series 1, Volume 1, February 1809

Using no links:

Example

Assuming the template is used on the page Ackermann’s Repository of Arts/Series 1/Volume 1/February 1809/Chinese Imperial Edict:

{{auto parents
 | no links = true
}}

Ackermann’s Repository of Arts, Series 1, Volume 1

Using existing links:

Example

Assuming the template is used on the page Castelvines y Monteses (Cosens)/Act 1/Scene 1:

{{auto parents
 | display = Castelvines y Monteses
 | existing links = true
}}

Castelvines y Monteses, Act 1

See also[edit]