Template:Number box: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{| class="floatright" cellpadding="5" cellspacing="0" style="background-color:#ffffff; border: 1px #aaa solid; border-collapse: collapse; margin-top: .5em;" rules="all" | {| class="floatright" cellpadding="5" cellspacing="0" style="background-color:#ffffff; border: 1px #aaa solid; border-collapse: collapse; margin-top: .5em;" rules="all" | ||
|+'''{{#if: {{{headlink|}}}|[[{{{headlink}}}{{!}} | |+'''{{#if: {{{headlink|}}}|[[{{{headlink}}}{{!}}{{{1}}} numbers]]|{{{1}}} numbers}}''' | ||
|- style="background-color: #dddddd" | |- style="background-color: #dddddd" | ||
||| style="width: 64px; background:#dddddd; text-align:center; font-size:smaller;" |<!--- | ||| style="width: 64px; background:#dddddd; text-align:center; font-size:smaller;" |<!--- | ||
Line 7: | Line 7: | ||
-->{{#if:{{{top|}}}<!-- | -->{{#if:{{{top|}}}<!-- | ||
-->|<!-- | -->|<!-- | ||
-->[[Contionary:{{{top}}}|{{#expr:{{{ | -->[[Contionary:{{{top}}}|{{#expr:{{{2}}} * 10}}]]<!-- | ||
-->}} || | -->}} || | ||
|- | |- | ||
Line 15: | Line 15: | ||
-->{{#if:{{{prev|}}}<!-- | -->{{#if:{{{prev|}}}<!-- | ||
-->|<!-- | -->|<!-- | ||
-->[[Contionary:{{{prev}}}|← {{#expr:{{{ | -->[[Contionary:{{{prev}}}|← {{#expr:{{{2}}} - 1}}]]<!-- | ||
-->}} | -->}} | ||
! width="98px" style="text-align:center;font-size:larger;" |<!-- | ! width="98px" style="text-align:center;font-size:larger;" |<!-- | ||
Line 26: | Line 26: | ||
-->{{#if:{{{next|}}}<!-- | -->{{#if:{{{next|}}}<!-- | ||
-->|<!-- | -->|<!-- | ||
-->[[Contionary:{{{next}}}|{{#expr:{{{ | -->[[Contionary:{{{next}}}|{{#expr:{{{2}}} + 1}} →]]<!-- | ||
-->}} | -->}} | ||
|- | |- | ||
| colspan="3" | | | colspan="3" | | ||
{{{contents}}} | {{{contents}}} | ||
|}<noinclude> | |}<noinclude>[[Category:Contionary templates]]{{documentation}}</noinclude> |
Revision as of 18:59, 7 August 2020
{{{num}}} | ||
---|---|---|
{{{contents}}} |
- The following documentation is located at Template:Number box/doc. [edit]
- Useful links: subpage list • links • redirects • transclusions • errors (parser/module) • sandbox
This template generates a navigation box between number entries of a particular language. Unlike Wiktionary's approach, this template doesn't rely on any module to function.
Parameters
|1=
(you can use1=
or write the argument directly as shown in the example below)- The complete name of your language, used in the table's caption. It is advisable to write the first letter as a capital letter for aesthetic purposes.
|2=
(same mechanism)- The number character of the current entry.
|headlink=
- Creates a link in the caption. Omit if desired.
|top=
- Written form of the direct multiple of ten of the current entry. Only for base-10 languages.[1]
|prev=
- Written form of the number immediately preceding.
|next=
- Written form of the number immediately after.
|contents=
- List of numeral subcategories (i.e. ordinal, cardinal, fractional, etc.). See the example below for a similar formatting to Wiktionary's.
Example
Suppose we want to set up a number box for the number 2 in some language, and we want the caption of the table to redirect to Contionary's main page. The template usage would be the following:
{{number box|Placeholder|2|headlink=Portal:Contionary|top=example-top|prev=example-before|next=example-after|contents=:''[[w:ordinal number|Ordinal]]'': {{term|example-second}}<br>''[[w:cardinal number|Cardinal]]'': {{term|example-two}<br>''[[w:multiplier (linguistics)|Multiplier]]'': {{term|example-double}}}}, etc.
which will render:
20 | ||
← 1 | {{{num}}} | 3 → |
---|---|---|
Notes
- ^ If your language's number system is based (pun intended) on any base other than 10, you can copy the source of the template, create your own template page, paste the code, and look for
#expr:{{{2}}} * 10
. Replace10
with the radix of your base.