Template:CHAPTERNAME/doc

From Wikibooks, open books for an open world
Jump to: navigation, search

This template returns the first field of the {{BOOKPAGENAME}}: the first field of the page name after the book name. (In some, but by no means all, books, this field is the chapter; the name of the template is therefore imperfectly descriptive, but conveniently short.)

Usage[edit]

Simply place {{CHAPTERNAME}} on a page to get the output.

Optionally specify a page as a parameter to see the output for a different page than the current one.

{{CHAPTERNAME|<full pagename>}}

Examples[edit]

page where called result
Taxi Tongue/Dialogue 4

Dialogue 4

Chess/Puzzles/Directmates

Puzzles

Wikijunior:Biology
Wikijunior:Dinosaurs/Apatosaurus

Apatosaurus

Wikijunior talk:Bugs/Shield Bug

Shield Bug

Category:Horticulture/Templates/Boxes

Templates

Category:Book:Wikijunior:Solar System/Templates

Templates

Template:Wikijunior:Solar System/coolfacts

Coolfacts

User:Pi zero/Conlang/Beginner/Sounds

Beginner

User:Pi zero/sandbox/Conlang/Beginner/Sounds

Beginner

Category:User:Pi zero/sandbox/Conlang/Beginner/Sounds

Beginner

Template:User:Pi zero/sandbox/Conlang/Beginner/Sounds

Beginner

Internals[edit]

This template delegates the logical analysis of the page-title structure to {{BOOKPAGENAME}}.

See also[edit]

  • {{BOOKNAME}} — deduces full root name of book associated with the current page.
  • {{BOOKPAGENAME}} — deduces the part of page name after name of associated book.
  • {{BOOKSORTKEY}} — deduces usual sort key for use in book categories.
  • {{BOOKTEMPLATE}} — deduces full root name for templates of book associated with the current page.
  • {{BOOKCATEGORY}} — deduces full root name for categories of book associated with the current page.
  • {{BOOKTALKNAME}} — deduces main talk page name of book associated with the current page.
  • {{NAIVEBOOKNAME}} — page name without subpages and retaining the namespace.
  • {{SUBJECTNAME}} — deduces full root name of subject associated with the current page.
  • {{SUBJECTCATEGORY}} — deduces full root name of subject-category associated with the current page.