• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.49
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:Page-multi

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
Template documentation[view] [edit] [history] [purge]
This template uses Lua:
  • Module:PageLinks

This is a very flexible page link template, which allows you to specify which links are shown beside the pagename. It can be used as a meta-template to support other page link templates, or it can be used alone.

Contents

  • 1 Usage
  • 2 Parameters
  • 3 Codes
  • 4 Examples
  • 5 Errors
    • 5.1 Not a valid link code
    • 5.2 No link type specified
    • 5.3 Function did not return a string value
  • 6 Tracking categories
  • 7 Adding new links
  • 8 See also

Usage

Standalone usage
{{page-multi|code 1|code 2|code 3|...|page=pagename}}

Parameters

  • 1, 2, 3, ... n: these parameters specify what links to display in the template. See the code table below for valid input codes.
  • page: the pagename. An error is returned if this is omitted.
  • separator: the separator to use in between links. Valid values are dot(⧼dot-separator⧽), comma(, ), pipe( | ), and tpt-languages( • ). If not specified, then dot is the default.
  • small: if this parameter exists, fonts will be displayed at 90% of the normal size.
  • sup: if this parameter exists, links will be displayed in superscript.
  • doc: this parameter is only available on template pages, using the /template sub-template. If set to yes, it will automatically generate documentation for that template.
  • date: if specified, the page view statistics will display for the 30 days prior to the given date (otherwise it's 60 days prior to the current date). The date string should either start with the format YYYY-MM-DD or YYYYMMDD (you can use {{subst:CURRENTTIMESTAMP}} to insert the current date).
  • demo: if this parameter is set to yes, the template will not output any categories.

Codes

Here is a list of currently supported link codes:

CodePreview
ttalk
tstalk
wlhlinks
rcrelated
editedit
hhistory
wwatch
tllogs
eflabuse filter log
vlm-sgsstats
pvstats
h500long history

The ts code differs from the t code in that it will display a link to the subject page when the template is used for a talk page, and vice versa.

Examples

Code Output
{{page-multi|page=Example|t|wlh}} Example (talk⧼dot-separator⧽links)
{{page-multi|page=Example|wlh|vlm-sgs}} Example (links⧼dot-separator⧽stats)

Errors

In certain circumstances, the template will generate errors. This is a list of all the error messages that the template might generate, and how users can resolve them.

Not a valid link code

  • Page-multi error: "xyz" is not a valid link code.

This error is generated if an invalid link code is specified. For a list of valid link codes, see the code list above.

No link type specified

  • Page-multi error: no link type specified.

This error is only generated when using Module:PageLinks directly to create a single link. The link code must be in the first positional parameter, like this: {{#invoke:PageLinks|single|<!-- link code -->|<!-- other parameters -->}}.

Function did not return a string value

  • Page-multi error: the function for code "xyz" did not return a string value.

This is an error in the software generating the links, and requires attention from the developers. Please start a new thread at Template talk:Page-multi.

Tracking categories

The template uses the following tracking categories:

Error category
  • Category:PageLinks transclusions with errors - this is used to track all the errors listed above

Adding new links

To add a new link, you need to edit the Lua module that this template is based on, Module:PageLinks. Instructions are in the source code, if you feel capable programming in Lua. If you're not familiar with Lua, feel free to make a request on Template talk:Page-multi, and someone might add the link for you.

See also

  • {{User-multi}}
  • {{Pagelinks}}
  • MediaWiki:UserLinks (edit | talk | history | links | watch | logs)
The above documentation is transcluded from Template:Page-multi/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:Page-multi&oldid=26564"
Categories:
  • Lua-based templates
  • Internal link templates
Last edited on 30 March 2014, at 09:09

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 30 March 2014, at 09:09.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop