Modèle:Book sections/doc

De Wiki Pathfinder Lacrypte
Aller à la navigation Aller à la recherche

{{Book sections}} produces a list of contents for a publication. It takes its information from the publication's fact database entry. This template employs {{Book sections/Section}} to render each section.

Template

Basic

This template uses the Facts article with the same name as the current article by default. Assuming we are on the article City of Seven Spears, using:

{{Book sections}}

is equivalent to manually specifying:

{{Book sections|Facts:City of Seven Spears}}

which results in:

{{#validateParameters:}}{{#ask: Fact type::Template:Facts/Book/Section-Has subobject::Facts:City of Seven Spears|?Name=Name|?Is subsection=Is subsection|?Author.Ordered_value=Author|?On page=On page|?To page=To page|?Description=Description|?Fact type=Fact type|limit=1000|introtemplate=|outrotemplate=|sort=|order=asc|userparam=Facts:Modèle:Book sections/doc|link=none|format=plainlist|template=Book sections/Section|named args=yes|valuesep=;|searchlabel=|default=}}

Advanced

To display the template for a specific Facts article, such as Facts:Dark Archive (sourcebook), pass the Facts article name as the first parameter:

{{Book sections|Facts:Dark Archive (sourcebook)}}

which results in:

{{#validateParameters:}}{{#ask: Fact type::Template:Facts/Book/Section-Has subobject::Facts:Dark Archive (sourcebook)|?Name=Name|?Is subsection=Is subsection|?Author.Ordered_value=Author|?On page=On page|?To page=To page|?Description=Description|?Fact type=Fact type|limit=1000|introtemplate=|outrotemplate=|sort=|order=asc|userparam=Facts:Modèle:Book sections/doc|link=none|format=plainlist|template=Book sections/Section|named args=yes|valuesep=;|searchlabel=|default=}}

Missing sections

If there are no sections defined for the given facts page this template shows a helpful stub banner instead.

<wikitext doc>

{{#validateParameters:}}{{#ask: Fact type::Template:Facts/Book/Section-Has subobject::Facts:Nonexisting|?Name=Name|?Is subsection=Is subsection|?Author.Ordered_value=Author|?On page=On page|?To page=To page|?Description=Description|?Fact type=Fact type|limit=1000|introtemplate=|outrotemplate=|sort=|order=asc|userparam=Facts:Modèle:Book sections/doc|link=none|format=plainlist|template=Book sections/Section|named args=yes|valuesep=;|searchlabel=|default=}}

</wikitext>

Facts formatting

This template formats certain facts in a specific manner.

Titles

Section titles can contain wikitext.

Authors

If multiple authors worked on a section, list each author separately.

  • If editing the Facts source, use a semicolon-delimited list of plain text without wikilink markup in the Author parameter of {{Facts/Book/Section}}.
  • If editing the Facts as a form, enter each author separately in the Author field of the section's entry in the Sections key.

For example, for a section with two authors, that section's Facts source should list:

{{Facts/Book/Section
...
|Author=Wolfgang Baur;Greg A. Vaughan

This template then renders the authors of that section as "Wolfgang Baur, Greg A. Vaughan" as on the article Fortress of the Stone Giants#Contents.

Subsections

If a section contains subsections, add them as separate Section items and enable the Is subsection Boolean parameter.

If editing a Facts article's source, the parameter name is case sensitive and begins with a capital I:

{{Facts/Book/Section|Is subsection=y

Any other spelling or capitalization will have no effect on the section.