Template:Allbooks category/parent/doc

This template attempts to include this allbooks category in one of its parents.

Usage

 * &lt;parent&gt; &lt;subject&gt;

where &lt;subject&gt; is the name of the subject page associated with this allbooks category (thus, &lt;subject&gt;), and &lt;parent&gt; is a parent name provided by that subject page (thus, it is the value of a parameter {{{{parent}}} or {{{parent2}}} passed to a call to Subject page on page &lt;subject&gt;).

This template then checks that the parent subject page exists ( &lt;parent&gt;) and is correctly formatted for automatic extraction of parameter values, and that its associated allbooks category exists; if not, it calls Allbooks category/error. If all is well, it adds this allbooks category to the parent's allbooks category.