Template:Shelf:Map/doc

Usage
This template applies a template to each element of a list, one by one, if the list is short enough. Meant for a list of ancestors of a shelf.
 * &mdash; the name of the template to be applied.
 * &mdash; the list.
 * &mdash; optional &mdash; if not provided, or if non-blank, the template provides diagnostic messages if it detects a problem; if provided and blank, no diagnostic messages.
 * &mdash; the name of the shelf, without its  prefix.  Only used when providing a diagnostic message.

Internals
Applies the template using Module:TScope, passing an element of the list as first unnamed parameter.

There is no need for this template to support any list length greater than the maximum number of ancestors per shelf. As of this writing, it supports up to list length 16.

The key templates that use this one, as of this writing, are Shelf:Category/display, Shelf:Allbooks category/display, and Shelves/leaf.