User:JMRyan/Shelf templates

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

This page is in response to Wikibooks:Staff lounge#Main pages in books should display thier bookshelf, from which the following is copied:

Is there any policy on this? If there isn't, could we create it? At least as a guideline? I think it'd be very helpful to have a link back to a book's bookshelf. --Dragontamer 03:32, 3 January 2006 (UTC)

I've created two templates in my user space that can help with this. Both are intended to be used at the bottom of the page.
  • User:JMRyan/Shelf1 presumes that it will only be used on the main page of a book. It is called with {{User:JMRyan/Shelf1|Bookshelf_name}}. To specify, for example, the Humanities bookshelf, the Bookshelf_name parameter should be "Humanities", not "Wikibooks:Humanities" or "Wikibooks:Humanities bookshelf".
  • User:JMRyan/Shelf2 presumes that it will be used on every of a book. It is called with {{User:JMRyan/Shelf2|Bookshelf_name|Book_name}} where the second parameter is optional.
The idea here is to create a Template:Shelf page by copying one of these two templates. If we want recommend that the bookshelf be linked from every page of a book, then copy from User:JMRyan/Shelf2; if we want to recommend that the bookshelf be linked only from the main page of a book, then copy from User:JMRyan/Shelf1. See User:JMRyan/Shelf templates for examples of use. Please use User talk:JMRyan/Shelf templates for discussion and to make alternative suggestions. --JMRyan 10:22, 4 January 2006 (UTC)


{{User:JMRyan/Shelf1|Humanities}} yields:

Bookshelf: Humanities

{{User:JMRyan/Shelf2|Humanities}} yields:

Bookshelf: Humanities

{{User:JMRyan/Shelf2|Humanities|Formal Logic}} yields:

{{ safesubst:p{{ safesubst:#ifFormal Logic:Book: Formal Logic
|1|2}}||}} Bookshelf: Humanities