Template:Broken ref
(see the help page).
Usage[edit]
Cite.php is the software extension for the footnotes system. Cite.php includes error checking and generates error messages using MediaWiki interface messages. When Cite.php encounters an error, it generates a message pulled from a MediaWiki interface page. The MediaWiki pages are customized to use {{Broken ref}} to control the display of the error message and to add a category. {{Broken ref}} uses namespace detection to choose whether pages are categorized or not and if error messages show or not.
Namespaces[edit]
This template causes error messages to show only in certain namespaces. Category sorting is set by a sortkey in the template.
Namespace | Sortkey | Uppercase |
---|---|---|
main (article) | alphabetic | |
category | γ | Γ |
template | τ | Τ |
file | ι | Ι |
help | ω | Ω |
festipedia | ψ | Ψ |
Errors on talk and other pages do not show by default but can be enabled by adding a rule to your CSS.
span.brokenref {
display: inline;
}
Categories[edit]
The template causes pages that show and error to be placed in a maintenance category. Pages in these categories are the repaired by editors. Errors on talk and other pages do not add the category. Category management is done through {{broken ref/cat}}.
- Category:Pages with citation errors: main category.
Parameters[edit]
Error messages use:
|msg=
text of the error message|lang=
language using ISO code (ignored in the Festipedia implementation)|help=
name of help page, main title only|nocat=
set to 'true' to suppress the category and thebrokenref
class; use when transcluding the WikiMedia interface page for documentation purposes
Prefix interface pages use:
|prefix=
text that precedes the message|lang=
language using ISO code
Examples[edit]
Use the following example when editing MediaWiki error message pages:
{{broken ref |msg=The <code><ref></code> tag has too many names |lang=en |help=Cite error ref too many keys |nocat={{{nocat|}}} }}
By including |nocat={{{nocat|}}}
, the |nocat=
parameter can be passed to {{broken ref}}.
Transcluding error messages[edit]
When creating documentation, the error messages can be transcluded so that the messages are automatically updated. Add |nocat=true
to suppress the error category and the class that hides the error in some namespaces. The message transclusion always adds a hard line break at the end.
Markup | Renders as |
---|---|
{{MediaWiki:Cite error ref too many keys|nocat=true}} |
The <ref> tag has too many names (see the help page).
|
To style the text to exactly simulate the message, use the {{error}} template.
Markup | Renders as |
---|---|
{{error|{{MediaWiki:Cite error ref too many keys|nocat=true}}}} |
The <ref> tag has too many names (see the help page).
|