Jump to content

Template:Simple Page Navigation/doc

From Wikibooks, open books for an open world

The examples below of the new and old parameter names attempt to illustrate the relationship between the two by generating the same navigation links using each of them. The theory of operation behind the change to the new syntax was primarily to split each of the old parameters into a link target and a display name, the same way that a piped wikilink has the hidden link target on the left of the pipe and the display text to the right.

New syntax

[edit source]
{{Simple Page Navigation
 | book = Wikibooks:Templates
 | prev = Wikibooks:Templates/Deletion
 | next = Wikibooks:Templates/User pages
 | book_disp   = Templates
 | prev_disp   = Deletion
 | next_disp   = User pages
 | current     = Navigation
 | bgcolor     = PaleTurquoise
 | bordercolor = SlateBlue
 | borderstyle = groove
 | borderwidth = 0.75em
}}
▶▶▶▶
Parsed
Output
▶▶▶▶
Previous page
Deletion
Templates Next page
User pages
Navigation
The new syntax has introduced the ability to manipulate its appearance using CSS3 declarations as well, which is also demonstrated above. To learn more about what values are valid to pass to those parameters, see the TemplateData section below.

Old syntax (deprecated)

[edit source]
{{Simple Page Navigation
 | BookName=[[Wikibooks:Templates|Templates]]
 | CurrentPage=Navigation
 | PrevPage=[[Wikibooks:Templates/Deletion|Deletion]]
 | NextPage=[[Wikibooks:Templates/User pages|User pages]]
}}
▶▶▶▶
Parsed
Output
▶▶▶▶
Previous page
Deletion
Templates Next page
User pages
Navigation
This shows the template with all of its styling parameters at their defaults.

TemplateData

[edit source]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for this template based on this TemplateData.

TemplateData for Simple Page Navigation

Creates a centered, rectangular navigation box showing the name of the current page and with links to the previous and next pages in a book, as well as the book's main page, or any other valid pages supplied to its parameters

Template parameters

This template has custom formatting.

ParameterDescriptionTypeStatus
Book targetbook

The full page name (and namespace, if necessary) of the book's main page

Default
{{NAMESPACE}}:{{ROOTPAGENAME}}
Page namesuggested
Previous page targetprev

The full page name (and namespace, if necessary) of the previous page in the book

Page namerequired
Next page targetnext

The full page name (and namespace, if necessary) of the next page in the book

Page namerequired
Book link textbook_disp

The text you wish to be linked to the book's main page. (optional)

Linesuggested
Previous page link textprev_disp

The text you wish to be linked to the previous page in the book. (optional)

Lineoptional
Next page link textnext_disp

The text you wish to be linked to the next page in the book. (optional)

Lineoptional
Current page display textcurrent CurrentPage

The text you wish to appear unlinked beneath the book name, if not the actual {{SUBPAGENAME}} of the page it appears on. (optional)

Default
{{SUBPAGENAME}}
Lineoptional
Background colorbgcolor

The color used to fill inside the box's border and behind its contents; can be formatted as: CSS color name keywords, #rrggbb[aa] red-green-blue 8-bit hexadecimal numbers [with optional transparency] or your choice of rgb(red, green, blue[, transparency]) or hsl(hue, saturation, lightness[, transparency]) 8-bit decimal numbers.

Suggested values
Black Silver Gray White Maroon Red Purple Fuschia Green Lime Olive Yellow Navy Blue Teal Cyan AliceBlue AntiqueWhite Aquamarine Azure Beige Bisque BlanchedAlmond BlueViolet Brown BurlyWood CadetBlue Chartreuse Chocolate Coral CornflowerBlue Cornsilk Crimson DarkBlue DarkCyan DarkGoldenRod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DimGray DodgerBlue FireBrick FloralWhite ForestGreen Gainsboro GhostWhite Gold Goldenrod GreenYellow Honeydew HotPink IndianRed Indigo Ivory Khaki Lavender LavenderBlush LawnGreen LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGray LightGreen LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow LimeGreen Linen MediumAquaMarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed MidnightBlue MintCream MistyRose Moccasin NavajoWhite Navy OldLace OliveDrab Orange OrangeRed Orchid PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip PeachPuff Peru Pink Plum PowderBlue RebeccaPurple RosyBrown RoyalBlue SaddleBrown Salmon SandyBrown SeaGreen SeaShell Sienna SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Tan Teal Thistle Tomato Turquoise Violet Wheat WhiteSmoke YellowGreen Transparent
Default
#ffffe6
Example
Moccasin
Lineoptional
Border colorbordercolor

The color used for the box's border; can be formatted as: CSS color name keywords, #rrggbb[aa] red-green-blue 8-bit hexadecimal numbers [with optional transparency] or your choice of rgb(red, green, blue[, transparency]) or hsl(hue, saturation, lightness[, transparency]) 8-bit decimal numbers.

Suggested values
Black Silver Gray White Maroon Red Purple Fuschia Green Lime Olive Yellow Navy Blue Teal Cyan AliceBlue AntiqueWhite Aquamarine Azure Beige Bisque BlanchedAlmond BlueViolet Brown BurlyWood CadetBlue Chartreuse Chocolate Coral CornflowerBlue Cornsilk Crimson DarkBlue DarkCyan DarkGoldenRod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DimGray DodgerBlue FireBrick FloralWhite ForestGreen Gainsboro GhostWhite Gold Goldenrod GreenYellow Honeydew HotPink IndianRed Indigo Ivory Khaki Lavender LavenderBlush LawnGreen LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGray LightGreen LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow LimeGreen Linen MediumAquaMarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed MidnightBlue MintCream MistyRose Moccasin NavajoWhite Navy OldLace OliveDrab Orange OrangeRed Orchid PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip PeachPuff Peru Pink Plum PowderBlue RebeccaPurple RosyBrown RoyalBlue SaddleBrown Salmon SandyBrown SeaGreen SeaShell Sienna SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Tan Teal Thistle Tomato Turquoise Violet Wheat WhiteSmoke YellowGreen Transparent
Default
#c5c58b
Example
SlateBlue
Lineoptional
Border styleborderstyle

One of the eight (four 2D and four 3D) border styles defined in CSS3, or 'none'. The two-dimensional styles are: 'solid', 'dashed', 'dotted' and 'double'. The three-dimensional styles perform an algorithmic color shift to the defined border color and apply it asymetrically along both axes to achieve their effect and are named: 'groove', 'ridge', 'inset' and 'outset'.

Suggested values
solid double dashed dotted groove ridge inset outset none
Default
double
Example
groove
Lineoptional
Border widthborderwidth

A measurement of the desired width of the box's border, formatted as a floating point decimal value followed immediately by the symbol or abbreviation for one of the 15 valid CSS3 units of distance (five absolute and ten relative to the user's device/display environment, though the absolute units are discouraged from use on WikiBooks as they are intended primarily for material to be physically printed) with no whitespace between them. The relative units are: '%' (percentage of parent object's size on the same axis), 'em' (width of lowercase m at page's default font size), 'rem' (width of lowercase m at browser's default text size), 'px' (display pixels, integer values only), 'vw', 'vh', 'vmin', 'vmax' (percentage of: display width, height, or smaller and larger of the display axes, respectively), 'ex' (height of lowercase x at page's default font size) and 'ch' (width of 0 at page's default font size). Absolute units are: 'pc' (picas), 'pt' (points), 'cm' (centimeters), 'mm' (millimeters) and 'in' (inches).

Default
4px
Example
0.75em
Lineoptional
Book linkBookName

Accepts a (piped) wikilink to the book's main page, include the double square brackets on each end.

Default
[[{{NAMESPACE}}:{{ROOTPAGENAME}}|{{ROOTPAGENAME}}]]
Contentdeprecated
Previous page linkPrevPage

Accepts a (piped) wikilink to the book's previous page, include the double square brackets on each end.

Contentdeprecated
Next page linkNextPage

Accepts a (piped) wikilink to the book's next page, include the double square brackets on each end.

Contentdeprecated

See also

[edit source]