Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Spaces/doc: Difference between revisions

Template page
use TemplateData, add i18n method (none), move parameter description to top
m added shorthand | cleanup
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{TemplateBox
{{TemplateBox
  |1       = 1
|1 = 1
  |1label   = n
|1label = n
  |1d-en   = -1 (to generate a single normal space), or a number between 1 and 25 (the desired number of non-breaking spaces)
|1d-en = -1 (to generate a single normal space), or a number between 1 and 25 (the desired number of non-breaking spaces)
  |1type   = number
|1type = number
  |1def     = 1
|1def = 1
  |1stat   = optional
|1stat = optional
 
|name = Spaces
  |name               = Spaces
|desc = Template to minimize code used for multiple consecutive [[w:Non-breaking space|non-breaking space]]s ("<code><big>&amp;nbsp;</big></code>").
  |desc               = Template to minimize code used for multiple consecutive [[w:Non-breaking space|non-breaking space]]s ("<code><big>&amp;nbsp;</big></code>").
|desc-td-en = Template to minimize code used for multiple consecutive non-breaking spaces ("&nbsp;").
    |desc-td-en       = Template to minimize code used for multiple consecutive non-breaking spaces ("&nbsp;").
|namespace =
  |namespace         =
|usergroup =
  |usergroup         =
|placement =
  |placement         =
|example-value = 2
  |example-value     = 2
|mustbesubst =
  |mustbesubst       =
|relieson =
  |relieson           =
|usage-notes =
  |usage-notes       =
|shorthand = {{Tlx|Space}}, {{Tlx|Nbsp}}, {{Tlx|Nbs}}
  |shorthand         = {{Tlx|Space}}, {{Tlx|Nbsp}}
|setscats =
  |setscats           =
|seealso =
  |seealso           =
|type =
  |type               =
|i18n-desc =
  |i18n-desc         =
|i18n-subpage =
  |i18n-subpage       =
|i18n-mediawiki-msg =
  |i18n-mediawiki-msg =
|i18n-method = -
  |i18n-method       = -
|example =
  |example           =
|print =
  |print             =
|useTemplateData = only
  |useTemplateData   = only
}}<includeonly>
}}<includeonly>
[[Category:Formatting templates]]
[[Category:Formatting templates]]
[[Category:Typing-aid templates]]
{{Protected}}
{{Protected}}
</includeonly>
</includeonly>

Latest revision as of 05:43, 19 May 2025

Template to minimize code used for multiple consecutive non-breaking spaces ("&nbsp;").

Usage

{{Spaces |1= }}

Or use the shorthand

{{Space}}, {{Nbsp}}, {{Nbs}}

Template parameters

<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

Template to minimize code used for multiple consecutive non-breaking spaces ("&nbsp;").

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
n1

-1 (to generate a single normal space), or a number between 1 and 25 (the desired number of non-breaking spaces)

Default
1
Numberoptional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified

Examples

Localization

This template is not intended to be localized.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.