Template:Navfobox/doc: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
(optinionaly)
 
 
(One intermediate revision by one other user not shown)
Line 21: Line 21:


== Example ==
== Example ==
{{navfobox|header=Incarnations of [[the Doctor]]
{{navfobox
|t1=Widely accepted|1=[[First Doctor|1]] • [[Second Doctor|2]] • [[Third Doctor|3]] • [[Fourth Doctor|4]] • [[Fifth Doctor|5]] • [[Sixth Doctor|6]] • [[Seventh Doctor|7]] • [[Eighth Doctor|8]] • [[War Doctor|War]] • [[Ninth Doctor|9]] • [[Tenth Doctor|10]] • [[Eleventh Doctor|11]] • [[Twelfth Doctor|12]] • [[Thirteenth Doctor|13]] • [[Fourteenth Doctor|14]]|section1Style=font-weight:500;
|header = Incarnations of [[the Doctor]]
|t2=Others / unplaced incarnations|2=[[Timeless Child ]] • [[Fugitive Doctor|Fugitive]] • [[The Doctor (The Brain of Morbius)|"Morbius"]]<br>[[The Doctor (Battlefield)|"Muldwych"]] • [[The Doctor (Alien Bodies)|"Relic"]] • [[The Curator]]
|t1     = Widely accepted
|t3=More ambiguous|3=[[The Other]] • [[Dr. Who]] •  [[The Watcher (Logopolis)|The Watcher]]<br>[[The Valeyard]] • [[Meta-Crisis Tenth Doctor|Meta-Crisis]] • ''[[:Category:Incarnations of the Doctor|More…]]'}}
|1     = [[First Doctor|1]] • [[Second Doctor|2]] • [[Third Doctor|3]] • [[Fourth Doctor|4]] • [[Fifth Doctor|5]] • [[Sixth Doctor|6]] • [[Seventh Doctor|7]] • [[Eighth Doctor|8]] • [[War Doctor|War]] • [[Ninth Doctor|9]] • [[Tenth Doctor|10]] • [[Eleventh Doctor|11]] • [[Twelfth Doctor|12]] • [[Thirteenth Doctor|13]] • [[Fourteenth Doctor|14]]
|section1Style = font-weight:500;
|t2     = Others / unplaced incarnations
|2     = [[Timeless Child ]] • [[Fugitive Doctor|Fugitive]] • [[The Doctor (The Brain of Morbius)|"Morbius"]]<br>[[The Doctor (Battlefield)|"Muldwych"]] • [[The Doctor (Alien Bodies)|"Relic"]] • [[The Curator]]
|t3     = More ambiguous
|3     = [[The Other]] • [[Dr. Who]] •  [[The Watcher (Logopolis)|The Watcher]]<br>[[The Valeyard]] • [[Meta-Crisis Tenth Doctor|Meta-Crisis]] • ''[[:Category:Incarnations of the Doctor|More…]]''
}}
The following code produces the navfobox on the right, {{tlx|doctors}}:
The following code produces the navfobox on the right, {{tlx|doctors}}:
<pre>{{navfobox|header=Incarnations of [[the Doctor]]
<pre>{{navfobox
|t1=Widely accepted|1=[[First Doctor|1]] • [[Second Doctor|2]] • [[Third Doctor|3]] • [[Fourth Doctor|4]] • [[Fifth Doctor|5]] • [[Sixth Doctor|6]] • [[Seventh Doctor|7]] • [[Eighth Doctor|8]] • [[War Doctor|War]] • [[Ninth Doctor|9]] • [[Tenth Doctor|10]] • [[Eleventh Doctor|11]] • [[Twelfth Doctor|12]] • [[Thirteenth Doctor|13]] • [[Fourteenth Doctor|14]]|section1Style=font-weight:500;
|header = Incarnations of [[the Doctor]]
|t2=Others / unplaced incarnations|2=[[Timeless Child ]] • [[Fugitive Doctor|Fugitive]] • [[The Doctor (The Brain of Morbius)|"Morbius"]]<br>[[The Doctor (Battlefield)|"Muldwych"]] • [[The Doctor (Alien Bodies)|"Relic"]] • [[The Curator]]
|t1     = Widely accepted
|t3=More ambiguous|3=[[The Other]] • [[Dr. Who]] •  [[The Watcher (Logopolis)|The Watcher]]<br>[[The Valeyard]] • [[Meta-Crisis Tenth Doctor|Meta-Crisis]] • ''[[:Category:Incarnations of the Doctor|More…]]''
|1     = [[First Doctor|1]] • [[Second Doctor|2]] • [[Third Doctor|3]] • [[Fourth Doctor|4]] • [[Fifth Doctor|5]] • [[Sixth Doctor|6]] • [[Seventh Doctor|7]] • [[Eighth Doctor|8]] • [[War Doctor|War]] • [[Ninth Doctor|9]] • [[Tenth Doctor|10]] • [[Eleventh Doctor|11]] • [[Twelfth Doctor|12]] • [[Thirteenth Doctor|13]] • [[Fourteenth Doctor|14]]
|section1Style = font-weight:500;
|t2     = Others / unplaced incarnations
|2     = [[Timeless Child ]] • [[Fugitive Doctor|Fugitive]] [[The Doctor (The Brain of Morbius)|"Morbius"]]<br>[[The Doctor (Battlefield)|"Muldwych"]] • [[The Doctor (Alien Bodies)|"Relic"]] • [[The Curator]]
|t3     = More ambiguous
|3     = [[The Other]] • [[Dr. Who]] •  [[The Watcher (Logopolis)|The Watcher]]<br>[[The Valeyard]] • [[Meta-Crisis Tenth Doctor|Meta-Crisis]] • ''[[:Category:Incarnations of the Doctor|More…]]''
}}</pre>
}}</pre>
Note in particular the use of <tt>section1Style=font-weight:500;</tt> to make the first section bolder.
Note in particular the use of <tt>section1Style=font-weight:500;</tt> to make the first section bolder.
Line 35: Line 46:
== Advanced usage ==
== Advanced usage ==
The <tt>headerNotOnPage</tt> parameter lets you define a page on which the header should not be displayed. The <tt>altHeader</tt> paramter can then optionally be used to define an alternate heading for this page. The <tt>altHeaderStyle</tt> can further optionally be used to style this header. For an example of this in action, see {{tlx|doctor more}}.
The <tt>headerNotOnPage</tt> parameter lets you define a page on which the header should not be displayed. The <tt>altHeader</tt> paramter can then optionally be used to define an alternate heading for this page. The <tt>altHeaderStyle</tt> can further optionally be used to style this header. For an example of this in action, see {{tlx|doctor more}}.
== See also ==
* {{tlx|collapsible navfobox}}
* {{tlx|counterparts}}


[[Category:Template documentation]]
[[Category:Template documentation]]

Latest revision as of 10:52, 6 May 2023

{{navfobox}} is a template used to create the "navfobox" (a cross between "navbox" and "infobox") templates that go below infoboxes. Basic usage is simple and as follows:

{{navfobox|header=the header of the navfobox
|t1=the title of the first section|1=the content of the first section
|t2=the title of the second section|2=the content of the second section}}

The header is the larger title that appears at the top of the navfobox and is optional. The t parameters (t1, t2, t3, etc.) define the titles of the sections and are optional. The numerical parameters (1, 2, 3, etc.) define the actual content of the sections. In theory, each of these parameters can be used infinetly to define infinetly many sections.

Custom styles[[edit source]]

The styles of certain parts of the template can be altered with CSS using the following parameters:

Part of the template Paramter Default CSS
Header headerStyle font-weight:500;
Titles titleStyle font-weight:500;font-size:75%;
Individual sections sectionNStyle font-weight:normal;

While titles can only be re-styled all together, sections are re-styled separately. For example, to restyle just the first section, you would use the section1Style parameter.

Example[[edit source]]

The following code produces the navfobox on the right, {{doctors}}:

{{navfobox
|header = Incarnations of [[the Doctor]]
|t1     = Widely accepted
|1      = [[First Doctor|1]] • [[Second Doctor|2]] • [[Third Doctor|3]] • [[Fourth Doctor|4]] • [[Fifth Doctor|5]] • [[Sixth Doctor|6]] • [[Seventh Doctor|7]] • [[Eighth Doctor|8]] • [[War Doctor|War]] • [[Ninth Doctor|9]] • [[Tenth Doctor|10]] • [[Eleventh Doctor|11]] • [[Twelfth Doctor|12]] • [[Thirteenth Doctor|13]] • [[Fourteenth Doctor|14]]
|section1Style = font-weight:500;
|t2     = Others / unplaced incarnations
|2      = [[Timeless Child ]] • [[Fugitive Doctor|Fugitive]] • [[The Doctor (The Brain of Morbius)|"Morbius"]]<br>[[The Doctor (Battlefield)|"Muldwych"]] • [[The Doctor (Alien Bodies)|"Relic"]] • [[The Curator]]
|t3     = More ambiguous
|3      = [[The Other]] • [[Dr. Who]] •  [[The Watcher (Logopolis)|The Watcher]]<br>[[The Valeyard]] • [[Meta-Crisis Tenth Doctor|Meta-Crisis]] • ''[[:Category:Incarnations of the Doctor|More…]]''
}}

Note in particular the use of section1Style=font-weight:500; to make the first section bolder.

Advanced usage[[edit source]]

The headerNotOnPage parameter lets you define a page on which the header should not be displayed. The altHeader paramter can then optionally be used to define an alternate heading for this page. The altHeaderStyle can further optionally be used to style this header. For an example of this in action, see {{doctor more}}.

See also[[edit source]]