User:Archimerged/PhysicsNavigation/doc
{{documentation subpage}}
{{intricate template}}
This template creates a navigation template for a larger subject when supplied with the desired topic and subtopics. It is especially purposed for browsing in a physics subfield, while mentioning
all necessary topics
Usage
Please remove the parameters that are left blank.
{{PhysicsNavigation
|Name =
{{subst:PAGENAME}} |Image =
|Label =
|KeyItems =
|Topic1 =
|Items1 =
|Topic2 =
|Items2 =
...
|Topic8 =
|Items8 =
|Scientists =
}}
Parameters
=Mandatory=
:;Name
:::The name of the template, which is needed for the "v • d • e" ("view • discuss • edit") links to work properly on all pages where the template is used. You can enter
for this value as a shortcut.
:;Topic1
:::The Name or Category of the Subfields, can also be a link
:;Items1
:::The links to the subfield. Please use <br />
See XHTML#common errors: "Note that any of these are acceptable in XHTML: <br></br>
, <br/>
and <br />
. Older HTML-only browsers will generally accept <br>
and <br />
. Using <br />
gives some degree of backward and forward compatibility." for line break Do not insert any newlines into the Items list: these cause a <p>
tag in the output, which makes a wider gap between lines. Instead, hide newlines from the wikitext parser by putting them inside HTML comments: <!-- newline newline -->
and {{tn|·}}
The bold middot (U+00B7 MIDDLE DOT) template {{tn|·}} places a non-breaking space before the dot and includes bold tags <b>·</b>
, giving "{{·}}" rather than " · ". The bullet (U+2022 BULLET) template {{tn|•}} is similar, giving "{{•}}". for separating the fields.
:::Alternately, to allow the browser to decide where the line breaks will be, while preventing line breaks within links, use {{tl|nowrap begin}}
at the front, separate fields with {{tn|·w}}
or {{tn|•w}}
, and put the required {{tl|nowrap end}}
last. This is much easier than piping each link:
::::[[Link name|Link name]]
.
:::Put extremely long links outside the nowrap section to avoid making the whole box very wide. See also the how-to guide.
:::For easy editing of the list of links, use HTML comments to hide newlines from the wikitext parser. Thus, put each link in on a separate line beginning with -->
and ending with <!--
followed by two newlines.
::::
class="wikitable" <--align="right" width="80%"--> |
=Optional=
:;Image
:::An image under the name of the template. Use either Image or Label
:;Label
:::A general Label, most likely a math formula like
::::
.
:::Use either Label or Image
:;LabelId
:::Description or link of the Image or Label
:;KeyItems
:::Important links for the field at large, that will be out of collapsible boxes.
:;Topic2
:::Other subfields. Up to 8 topics (Topic2..Topic8) are supported.
:;Items2
:::The links to the subfields. See Items1 under Mandatory.
:;Scientists
:::A List of Scientists with important contributions in this field.
Examples
=Example 1=
{{PhysicsNavigation
|Name = Plasma physics
|Image = Plasma.jpg
|LabelId = Plasma lamp
|Topic1 = Description
|Items1 = {{nowrap begin}} {{·w}}Vlasov equation {{·w}}MHD {{·w}}Plasma channel {{·w}}Plasma parameters {{·w}}Magnetohydrodynamics {{·w}}Electric field screening {{·w}}List of plasma physicists {{nowrap end}} {{·w}}[[List of publications in physics#Plasma physics|Important publications in plasma physics]]{{·w}}IEEE Nuclear and Plasma Sciences Society{{·w}}
}}
=Example 2=
{{PhysicsNavigation
|Name = Continuum mechanics
|Image = BernoullisLawDerivationDiagram.png
|KeyItems = Conservation of mass
Conservation of momentum|Topic1 = Classical mechanics
· Tensor
|Topic2 = Solid mechanics
|Items2 = Solids · Elasticity
Plasticity · Hooke's law
Rheology · Viscoelasticity|Topic3 = Fluid mechanics
|Items3 = Fluids · Fluid statics
Fluid dynamics· Viscosity · Newtonian fluids
Non-Newtonian fluids
Surface tension· Navier
|}}
=Example 3=
That the navigation box automatically collapses if the user views an item which is defined inside
a
cTopic = {{{cTopic}}}
for example
{{PhysicsNavigation
|Name = String theory
|Image = Point&string.png
|KeyItems = Superstring theory
|Topic1 = Theory
|Items1 = Bosonic string theory
M-theory (simplified)Type I string · Type II string
String field theory · Heterotic string
|Topic2 = Concepts
|Topic3 = Related Topics
|Items3 = Supersymmetry · Supergravity · Quantum gravity
|Scientists = Witten
|cTopic = {{{cTopic}}}
}}
inside the article's page, add the template plus the parameter cTopic= which is named after the
browsed topic. Note both names have to match exactly !
For example, in the page about Branes add
{{String-theory|cTopic=Concepts}}
and the topic Concepts uncollapses.
Results
style="border: solid white 8px;" |
style="vertical-align:top"|Example 1
!style="vertical-align:top"|Example 2 !style="vertical-align:top"|Example 3 |
---|
style="vertical-align:top"|{{User:Archimerged/PhysicsNavigation
|Name = Plasma physics |Image = Plasma.jpg |LabelId = Plasma lamp |Topic1 = Description |Items1 = {{nowrap begin}} {{·}}{{wrap}}Vlasov equation {{·}}{{wrap}}MHD {{·}}{{wrap}}Plasma channel {{·}}{{wrap}}Plasma parameters {{·}}{{wrap}}Magnetohydrodynamics {{·}}{{wrap}}Electric field screening {{·}}{{wrap}}List of plasma physicists {{nowrap end}} {{·}}{{wrap}}[[List of publications in physics#Plasma physics|Important publications in plasma physics]]{{·}}{{wrap}}IEEE Nuclear and Plasma Sciences Society{{·}}{{wrap}} }} |style="vertical-align:top"|{{User:Archimerged/PhysicsNavigation |Name = Continuum mechanics |Image = BernoullisLawDerivationDiagram.png |KeyItems = Conservation of mass |Topic1 = Classical mechanics |Items1 = Stress · Strain · Tensor |Topic2 = Solid mechanics |Items2 = Solids · Elasticity Plasticity · Hooke's law |Topic3 = Fluid mechanics |Items3 = Fluids · Fluid statics |
|style="vertical-align:top"|{{String theory|cTopic=Concepts}}
|}
Dot size reference list
style="text-align:center; background:transparent;"
| style="width:1.7em;" | · | align="left" | <small> middot |
·
| align="left" | middot |
·
| align="left" | <small> bold middot |
·
| align="left" | bold middot |
•
| align="left" | <small> bullet |
•
| align="left" | bullet |
•
| align="left" | bold bullet |
–
| align="left" | ndash |
—
| align="left" | mdash |
See also
- {{tl|Navbox}}
- {{tn|!}} — Permits use of piped links inside a navigation box.
- {{tn|·}} or {{tl|dot}} or {{tl|middot}} — Bold middot "·" is mostly used for dotted lists, such as for link lists in navigation boxes.
- {{tn|•}} or {{tl|bull}} or {{tl|bullet}} — Bullet "•" is mostly used for dotted lists that use small font sizes.
- {{tl|ndash}} — Ndash "–" is a short dash.
- {{tl|mdash}} — Mdash "—" is a long dash.
When making dotted lists you might need to handle proper word wrapping (line breaking):
- {{tl|nowrap begin}} ... {{tl|•w}} ... {{tl|nowrap end}} — Allows wraps only after the {{tl|•w}}, {{tl|·w}} or {{tl:wrap}.
- Wikipedia:Line break handling — The how-to guide detailing how to handle line wrapping on Wikipedia.
- Wikipedia:Line break handling#nowrap begin