Template:Portrait Gallery/doc

Description
This template is used to make portrait galleries.

This template uses File:NoPicAvailable.png, as well as several subtemplates.
 * Dependencies

The template works is to be called as follows:
 * Syntax

The "portrait code" is peculiar. It consists of three parts, separated by backslashes ("\"). For example, Caesar \ Caesar_Marine_Portrait.png \ Caesar Clown is a portrait code.
 * The first part is the text that is to be showed below the portrait.
 * The second part is the name of the portrait picture (without link brackets or "File:"). It is optional: if it is not present, it is taken to be "XXX Portrait.png", with "XXX" being the text in the third part. Also, there is a special "NOPIC" value: it uses File:NoPicAvailable.png.
 * The third part is the name of the page the portrait and text link to. It is optional: if it is not present, it is taken to be the same as the text (excluding parentheses). Also, there is a special "NOLINK" value, for cases when the portrait should not link to any page.

Examples
The following code

gives the following result:

An example with many differents cases, with comments:

An example with only one portrait:

Galleries with Sections
Sometimes, one needs to make sections in a portrait gallery. This can be done by joining several galleries together, thanks to the multi parameter. The section parameter is a shortcut: section=XXX is the same as multi=section|title=XXX. Here is an example of gallery with sections:
 * Use multi=header to start a gallery; any portrait code will be ignored (only the title of the gallery will be printed).
 * Use multi=section to make a section.
 * Use multi=footer to end the gallery. Portrait codes will be ignored.

Galleries used as Sections in Other Galleries
Sometimes, galleries are used as sections in bigger galleries (such as in Template:Marine Members Gallery). To allow for a gallery to be included in another, one needs to add the following little code snippet:. It must be added as a parameter. The following example is the code for Template:Macro_Pirates_Gallery:

Now we can include this template as a section in another gallery, using parameter included=yes:

In order to do the same for galleries that already have several sections, add the snippet in both the header and footer. Here is a simple example:

Putting this in "Template:Foobar Gallery", for example, we can include it in another gallery, exactly as a single-section template, by using.

Limitations
For now, the gallery is limited to 25 portraits, and only 5-column layout is available.