User:Behtis/Template constructing/test:persian name
{{#if:{{{hangul|}}}{{{farsi|}}}{{{title|}}}|<table class="infobox bordered" bgcolor="#f7f8ff" style="margin:0 0 1em 1em" width="{{{tablewidth|250}}}"> {{#switch:{{{context|}}} |n |north |dprk |nk={{#if:{{{logoimage|}}}|<tr><th style="background:{{{color|#ccf}}}; border-bottom:1px solid; color:{{{fontcolor|}}}" width="{{#if:{{{tablewidth|}}}|{{#expr: {{{tablewidth}}}/2|125}}">{{{title|{{PAGENAME}}}}}</th><th style="border-top:1px solid" width="{{#if:{{{tablewidth|}}}|{{#expr: {{{tablewidth}}}/2|125}}">{{{logoimage}}}</th></tr>|<tr><th style="background: {{{color|#ccf}}}; border-bottom: 1px solid border-top:1px solid; color:{{{fontcolor|}}}" colspan="2" align="center" width="{{{tablewidth|250}}}"> {{{title|{{PAGENAME}} }}}</th> </tr>}} {{#if:{{{image|}}} |<tr><td colspan="2" align="center" style="border-top: 1px solid">{{{image}}}</td></tr> |{{#if:{{{img|}}} |<tr><td colspan="2" align="center" style="border-top: 1px solid">[[Image:{{{img}}}{{!}}{{{width|200}}}px{{!}}{{{caption|{{{img}}} }}}]]<br/><small>{{{caption|}}}{{{image_caption|}}}</small></td></tr>}} }}{{#if:{{{image|}}}{{{img|}}} |<tr><td colspan="2" align="center" style="background:{{{color|#ccf}}}; border-top:1px solid; color:{{{fontcolor|}}}" >'''persian name'''</td></tr>}} <tr> <td align="right" style="border-top: 1px solid"> [[Hangul|Chosŏn'gŭl]]:</td> <td style="border-top: 1px solid;"> <div class="nounderlines">{{lang|ko|{{{hangul}}}}}</div> </td></tr> {{#if:{{{farsi|}}}|{{#ifeq: {{{farsi}}}|!|[[Category:Wikipedia articles needing hanja]]|<tr><td align="right" style="border-top: 1px solid">[[farsi]]:</td><td style="border-top: 1px solid;"><div class="nounderlines">{{#ifeq:{{{farsi}}}|none|{{{farsi}}}|{{lang|ko|{{{farsi}}}}}}}</div></td></tr>}} }} {{#if:{{{mr|}}}|<tr><td align="right" style="border-top: 1px solid">[[McCune-Reischauer]]:</td><td style="border-top: 1px solid;">{{{mr}}}</td></tr>|<includeonly>[[Category:Wikipedia articles needing romanized persian|{{PAGENAME}}]]</includeonly>}} {{#if:{{{rr|}}}|<tr><td align="right" style="border-top: 1px solid">[[Revised Romanization of persian|Revised Romanization]]:</td><td style="border-top: 1px solid;">{{{rr}}}</td></tr>|<includeonly>[[Category:Wikipedia articles needing romanized persian|{{PAGENAME}}]]</includeonly>}} {{#if:{{{text|}}}|<tr> <td align="center" colspan="2" style = "border-top:1px solid;">{{{text}}}</td></tr>|}} </table> |s |south |rok |sk | #default = {{#if:{{{logoimage|}}}|<tr><th style="background:{{{color|#ccf}}}; border-bottom:1px solid; color:{{{fontcolor|}}}" width="{{#if:{{{tablewidth|}}}|{{#expr: {{{tablewidth}}}/2|125}}">{{{title|{{PAGENAME}}}}}</th><th style="border-top:1px solid" width="{{#if:{{{tablewidth|}}}|{{#expr: {{{tablewidth}}}/2|125}}">{{{logoimage}}}</th></tr>|<tr><th style="background: {{{color|#ccf}}}; border-bottom: 1px solid border-top:1px solid; color:{{{fontcolor|}}}" colspan="2" align="center" width="{{{tablewidth|250}}}"> {{{title|{{PAGENAME}} }}}</th></tr>}} {{#if:{{{image|}}} |<tr><td colspan="2" align="center" style="border-top: 1px solid">{{{image}}}</td></tr> |{{#if:{{{img|}}}|<tr><td colspan="2" align="center" style="border-top: 1px solid">[[Image:{{{img}}}{{!}}{{{width|200}}}px{{!}}{{{caption|{{{img}}} }}}]] <br/><small>{{{caption|}}}{{{image_caption|}}}</small></td></tr>}} }}{{#if:{{{image|}}}{{{img|}}} |<tr><td colspan="2" align="center" style="background:{{{color|#ccf}}}; border-top:1px solid; color:{{{fontcolor|}}}" >'''Korean name'''</td></tr>}} <tr> <td align="right" style="border-top: 1px solid"> [[Hangul]]:</td> <td style="border-top: 1px solid;"> <div class="nounderlines">{{lang|ko|{{{hangul}}}}}</div> </td></tr> {{#if:{{{farsi|}}}|{{#ifeq: {{{farsi}}}|!|[[Category:Wikipedia articles needing farsi]]|<tr><td align="right" style="border-top: 1px solid">[[farsi]]:</td><td style="border-top: 1px solid;"><div class="nounderlines">{{#ifeq:{{{farsi}}}|none|{{{farsi}}}|{{lang|ko|{{{farsi}}}}}}}</div> </td></tr>}} }} <tr> {{#if:{{{rr|}}}|<td align="right" style="border-top: 1px solid"> [[Revised Romanization of persian|Revised Romanization]]:</td> <td style="border-top:1px solid;"> {{{rr}}}</td></tr>|<includeonly>[[Category:Wikipedia articles needing romanized persian|{{PAGENAME}}]]</includeonly>}} {{#if:{{{mr|}}}|<tr><td align="right" style="border-top: 1px solid">[[McCune-Reischauer]]:</td><td style="border-top: 1px solid;">{{{mr}}}</td></tr>|<includeonly>[[Category:Wikipedia articles needing romanized persian|{{PAGENAME}}]]</includeonly>}}{{#if:{{{text|}}}|<tr> <td align="center" colspan="2" style = "border-top:1px solid;">{{{text}}}</td></tr>}} </table> }}|<includeonly>[[Category:Articles needing persian script or text|{{PAGENAME}}]]</includeonly> }}<noinclude> ==Informational fields== {{persian name| title={{{title}}}| logoimage={{{logoimage}}}| image={{{image}}}| farsi={{{farsi}}}| mr={{{mr}}}| rr={{{rr}}}| text=This is the default format. }} The '''hangul''' field must always be filled out. If you define no parameters at all, but simply type <nowiki>{{persian name}}, you will add the article to Category:Articles needing farsi script or text. This will notify other editors that a persian name is needed for the article.
This template also includes numerous optional fields:
- title, displayed at the top of the table; defaults to the page name.
- hanja, the hanja for a given Korean name.
- mr, the McCune-Reischauer romanization of the name.
- rr, the Revised Romanization of the name.
- text, additional free text at the bottom of the template. Use sparingly.
- Image fields:
- img, the filename of the image (for an image called File:XYZ, specify "img=XYZ").
- width, the display width of img, in pixels.
- caption, displayed in small text beneath img.
- image, a text field which generally contains an image in thumbnail format. (deprecated)
- logoimage, a text field optionally displayed in the upper right of the box, which typically contains an organization logo.
- img, the filename of the image (for an image called File:XYZ, specify "img=XYZ").
If you set "hanja=!", you will add the article to Category:Wikipedia articles needing hanja. In that case, the hanja field will not display.
It is sometimes helpful to link the hangul or hanja to an entry or entries on Wiktionary. In these cases, the links will display without underlining, for easier readability. Template:Linktext is recommended for this purpose.
Context specification
edit{{{title}}} | |
[[File:{{{image}}}|frameless]] | |
Korean name | |
---|---|
Chosŏn'gŭl | {{{hangul}}} |
Hancha | {{{hanja}}} |
Revised Romanization | {{{rr}}} |
McCune–Reischauer | {{{mr}}} |
Here, the "context" attribute has been set to "north". |
North or South Korean contexts can be specified using the "context" attribute. For a North Korean article, set "context=north".
Display
editVarious display attributes can also be adjusted, but that is not recommended in most cases. All of these attributes are optional.
This flexibility is intended to allow this template to fit neatly above and below other infoboxes, or to meet the special needs of certain article series.
Adjustable display attributes include:
- tablewidth, in pixels.
- color of the title bar.
- fontcolor, the color of the text within the title bar.
</nowiki>