Template:Magic word templates/shelf page examples/doc
Appearance
This is a documentation subpage for Template:Magic word templates/shelf page examples It may contain usage information, categories and other content that is not part of the original template page. |
Usage
[edit source]Transclude this on the documentation page of a magic word template relating a page to its intrinsically associated shelf, to produce a table of examples of the template's behavior on various page names. The template is expected to accept an unnamed parameter overriding the current page name. See for example Template:SHELFNAME/doc.
This template itself accepts an unnamed parameter specifying the name of the template to be demonstrated; otherwise it uses {{OBJECTPAGENAME}}. For example,
{{Template:Magic word templates/shelf page examples|SHELFNAME}}
would produce
page where called | result | note |
---|---|---|
Shelf:Biology | Shelf:Biology
| |
Biology | Shelf:Biology
|
likely the Shelf: prefix was simply omitted
|
Wikijunior:Shelf:Biology | Shelf:Biology
|
the Shelf: prefix in the pagename overrides all other considerations
|
Wikijunior:Biology | Shelf:Wikijunior:Biology
|
parallel to content-space behavior of {{BOOKNAME}} |
Template:Biology | Shelf:Biology
|
ignore namespace prefix of non-content namespace |
Category:Shelf:Biology/all books | Shelf:Biology
|
the Shelf: prefix in the pagename overrides all other considerations
|
Category:Biology/all books | Shelf:Biology
|
ignore namespace prefix of non-content namespace |
Internals
[edit source]The examples are in subtemplate {{Magic word templates/shelf page examples/core}}; this template only chooses the target for demonstration and delegates there.