Template:User book

From Wikibooks, open books for an open world
Jump to: navigation, search
Template documentation[edit] [history] [purge]

This userbox declares that the user contributes to a certain wikibook, and adds the user to a category associated with that book. The appearance of the userbox for a given book can be customized by that book.


The template takes one required, unnamed parameter, which is the title of the book. For example,

{{User book|Using Wikibooks}}

would produce

Wikibooks-logo.svg This user contributes to the
Using Wikibooks wikibook.

The template adds the user to Category:{{{1}}}/Users, where {{{1}}} is the title specified. In the example above, the user would be added to Category:Using Wikibooks/Users. Calling the template with parameter nocat set to any non-null value will suppress this category, as in

{{User book|Using Wikibooks|nocat=1}}

Customization per book[edit]

By default, the userbox looks like this:

Wikibooks-logo.svg This user contributes to the
[[{{{1}}}]] wikibook.

To specify a different appearance for a book called Title, create a template called Template:Title/User book, containing markup

{{User book/Custom|{{{1}}}|{{{2}}}|...}}

where ... are named parameters that will be passed to template {{Userbox}}. The parameters supported are (as of this writing) all those documented for {{Userbox}} except info, usercategory2, and usercategory3. If usercategory is specified, it overrides the default name for the category; and if nocat is specified with a non-null value, it prevents the category from ever being used (so that it then doesn't matter whether or not the call to {{User book}} uses nocat).

For example, the userbox is customized for Wikijunior:Languages by means of Template:Wikijunior:Languages/User book, so that

{{User book|Wikijunior:Languages}}


Languages Graphic.png This user contributes to the
Wikijunior:Languages wikibook.