Last modified on 29 May 2012, at 14:48

Template:Chapter link/doc

UsageEdit

This template allows linking within a book to another chapter of the book easier. Using only one unnamed paramater in this template will create a link in the form [[{{ROOTBOOKNAME}}/{{{1}}}|{{{1}}}]], so {{Chapter link|Introduction}} will link to the "Introduction" chapter of the current book, which manually would have to be done as [[Book name/Introduction|Introduction]].

Other parametersEdit

name - allows a different name for the link, so {{chapter link|doc|name=Introduction}} becomes, if it is in Wikijunior:Biology, Introduction. This is especially useful for books and subpages with long names. The second unnamed parameter can be used instead of name

section - allows a link to a specific section. By default the link will appear as the name of the section, unless the "name" parameter is set, in which case it will become whatever the name parameter is set to unless it is set to "default", in which case it will display the subpage name (parameter 1).

prefix - By default this template uses {{ROOTBOOKNAME}} as the base book name. This will keep namespaces like "Wikijunior" and "Cookbook" in the book name but will remove ones like "Template" and "Category". Sometimes you may want to link to a book-specific template or category from the book itself, and this can be done by setting prefix to the desired prefix (namespace).

bookname/book - Either of these parameters allow a different book than the current one to be linked to. These parameters can also be used to switch between different means of determining the book name. Setting bookname to "root", "full", or "basic" will trigger the use of {{ROOTBOOKNAME}}, {{FULLBOOKNAME}}, and {{BOOKNAME}} respectively.