Difference between revisions of "Template:Infobox Korea"

From blackwiki
Jump to navigation Jump to search
imported>Pldx1
(+1)
imported>Primefac
(fix some major issues with implementation)
 
Line 1: Line 1:
 
{{#if:{{{hangul|}}}{{{hanja|}}}{{{rr|}}}{{{mr|}}} | <!--  
 
{{#if:{{{hangul|}}}{{{hanja|}}}{{{rr|}}}{{{mr|}}} | <!--  
-->{{#ifeq:{{{child|}}} | yes | | {{Template:/Infobox Korea/Header
+
-->{{#ifeq:{{{child|}}} | yes | | {{Infobox Korea/Header
 
   |title            = {{#if: {{{title|}}} | {{{title}}} | {{#ifeq: {{{child|}}} | yes | | {{PAGENAMEBASE}} }} }}
 
   |title            = {{#if: {{{title|}}} | {{{title}}} | {{#ifeq: {{{child|}}} | yes | | {{PAGENAMEBASE}} }} }}
 
   |headercolor      = {{{headercolor|}}}
 
   |headercolor      = {{{headercolor|}}}
Line 10: Line 10:
 
   }} }}<!--
 
   }} }}<!--
  
-->{{#if: {{{hangul|}}}{{{hanja|}}} | {{Template:/Infobox Korea/Both_Koreas
+
-->{{#if: {{{hangul|}}}{{{hanja|}}} | {{Infobox Korea/Both_Koreas
 
   |korean_header    = {{#if: {{{koreanname|}}}|{{{koreanname}}} | {{#ifeq: {{{child|}}} | yes | Korean name | {{#if: {{{img|}}} | Korean name }} }} }}
 
   |korean_header    = {{#if: {{{koreanname|}}}|{{{koreanname}}} | {{#ifeq: {{{child|}}} | yes | Korean name | {{#if: {{{img|}}} | Korean name }} }} }}
 
   |headercolor      = {{{headercolor|}}}
 
   |headercolor      = {{{headercolor|}}}
Line 23: Line 23:
 
   }} }}<!--
 
   }} }}<!--
  
-->{{#if: {{{hangulho|}}}{{{hanjaho|}}} | {{Template:/Infobox Korea/Both_Koreas
+
-->{{#if: {{{hangulho|}}}{{{hanjaho|}}} | {{Infobox Korea/Both_Koreas
 
   |korean_header    = [[art name|Pen name]]
 
   |korean_header    = [[art name|Pen name]]
 
   |headercolor      = {{{headercolor|}}}
 
   |headercolor      = {{{headercolor|}}}
Line 36: Line 36:
 
   }} }}<!--
 
   }} }}<!--
  
-->{{#if: {{{hangulja|}}}{{{hanjaja|}}} | {{Template:/Infobox Korea/Both_Koreas
+
-->{{#if: {{{hangulja|}}}{{{hanjaja|}}} | {{Infobox Korea/Both_Koreas
 
   |korean_header    = [[Courtesy name]]
 
   |korean_header    = [[Courtesy name]]
 
   |headercolor      = {{{headercolor|}}}
 
   |headercolor      = {{{headercolor|}}}
Line 49: Line 49:
 
   }} }}<!--
 
   }} }}<!--
  
-->{{#if: {{{hangulborn|}}}{{{hanjaborn|}}} | {{Template:/Infobox Korea/Both_Koreas
+
-->{{#if: {{{hangulborn|}}}{{{hanjaborn|}}} | {{Infobox Korea/Both_Koreas
 
   |korean_header    = Birth name
 
   |korean_header    = Birth name
 
   |headercolor      = {{{headercolor|}}}
 
   |headercolor      = {{{headercolor|}}}
Line 62: Line 62:
 
   }} }}<!--
 
   }} }}<!--
  
-->{{#if: {{{hangula|}}}{{{hanjaa|}}} | {{Template:/Infobox Korea/Both_Koreas
+
-->{{#if: {{{hangula|}}}{{{hanjaa|}}} | {{Infobox Korea/Both_Koreas
 
   |korean_header    = Childhood name
 
   |korean_header    = Childhood name
 
   |headercolor      = {{{headercolor|}}}
 
   |headercolor      = {{{headercolor|}}}
Line 75: Line 75:
 
   }} }}<!--
 
   }} }}<!--
  
-->{{#if: {{{hangulstage|}}}{{{hanjastage|}}} | {{Template:/Infobox Korea/Both_Koreas
+
-->{{#if: {{{hangulstage|}}}{{{hanjastage|}}} | {{Infobox Korea/Both_Koreas
 
   |korean_header    = Stage name
 
   |korean_header    = Stage name
 
   |headercolor      = {{{headercolor|}}}
 
   |headercolor      = {{{headercolor|}}}
Line 88: Line 88:
 
   }} }}<!--
 
   }} }}<!--
  
-->{{#if: {{{hangulgye|}}}{{{hanjagye|}}} | {{Template:/Infobox Korea/Both_Koreas
+
-->{{#if: {{{hangulgye|}}}{{{hanjagye|}}} | {{Infobox Korea/Both_Koreas
 
   |korean_header    = [[Dharma name]]
 
   |korean_header    = [[Dharma name]]
 
   |headercolor      = {{{headercolor|}}}
 
   |headercolor      = {{{headercolor|}}}
Line 101: Line 101:
 
   }} }}<!--
 
   }} }}<!--
  
-->{{#if: {{{hangulph|}}}{{{hanjaph|}}} | {{Template:/Infobox Korea/Both_Koreas
+
-->{{#if: {{{hangulph|}}}{{{hanjaph|}}} | {{Infobox Korea/Both_Koreas
 
   |korean_header    = [[Posthumous name]]
 
   |korean_header    = [[Posthumous name]]
 
   |headercolor      = {{{headercolor|}}}
 
   |headercolor      = {{{headercolor|}}}
Line 114: Line 114:
 
   }} }}<!--
 
   }} }}<!--
  
-->{{#if: {{{hangul1|}}}{{{hanja1|}}} | {{Template:/Infobox Korea/Both_Koreas
+
-->{{#if: {{{hangul1|}}}{{{hanja1|}}} | {{Infobox Korea/Both_Koreas
 
   |korean_header    = {{{othername1}}}
 
   |korean_header    = {{{othername1}}}
 
   |headercolor      = {{{headercolor|}}}
 
   |headercolor      = {{{headercolor|}}}
Line 127: Line 127:
 
   }} }}<!--
 
   }} }}<!--
  
-->{{#if: {{{hangul2|}}}{{{hanja2|}}} | {{Template:/Infobox Korea/Both_Koreas
+
-->{{#if: {{{hangul2|}}}{{{hanja2|}}} | {{Infobox Korea/Both_Koreas
 
   |korean_header    = {{{othername2}}}
 
   |korean_header    = {{{othername2}}}
 
   |headercolor      = {{{headercolor|}}}
 
   |headercolor      = {{{headercolor|}}}
Line 140: Line 140:
 
   }} }}<!--
 
   }} }}<!--
  
-->{{#if: {{{hangul3|}}}{{{hanja3|}}} | {{Template:/Infobox Korea/Both_Koreas
+
-->{{#if: {{{hangul3|}}}{{{hanja3|}}} | {{Infobox Korea/Both_Koreas
 
   |korean_header    = {{{othername3}}}
 
   |korean_header    = {{{othername3}}}
 
   |headercolor      = {{{headercolor|}}}
 
   |headercolor      = {{{headercolor|}}}
Line 153: Line 153:
 
   }} }}<!--
 
   }} }}<!--
  
-->{{#ifeq:{{{child|}}} | yes | | {{Template:Infobox Korea/Footer|footnote = {{{text|}}} }} }} <!--  
+
-->{{#ifeq:{{{child|}}} | yes | | {{Infobox Korea/Footer|footnote = {{{text|}}} }} }} <!--  
 
It is not clear if these tracking categories are useful
 
It is not clear if these tracking categories are useful
 
In any case, they have to be implemented in InfoboxKorea/Both_Koreas, not here
 
In any case, they have to be implemented in InfoboxKorea/Both_Koreas, not here

Latest revision as of 01:59, 14 October 2020

This template and its sub-templates provide a stand-alone implementation of a Korean language infobox, using direct calls to {{Infobox}}.

[[Category:Infobox templates|Template:Remove first word]][[Category:Infobox templates|Template:Remove first word]][[Category:Infobox templates|Template:Remove first word]][[Category:Infobox templates|Template:Remove first word]][[Category:Infobox templates|Template:Remove first word]][[Category:Infobox templates|Template:Remove first word]][[Category:Infobox templates|Template:Remove first word]][[Category:Infobox templates|Template:Remove first word]][[Category:Infobox templates|Template:Remove first word]][[Category:Infobox templates|Template:Remove first word]][[Category:Infobox templates|Template:Remove first word]]
Instructions for use
File:Kim Hongdo-Mountain.jpg
산수화
Hangul
사용 지침
Hanja
使用说明
Revised R.Template:Transl
McCune–R.Template:Transl
Pen name
Hangul
미상
Revised R.Template:Transl
Courtesy name
Hangul
미상
Birth name
Hangul
미상
Childhood name
Hangul
미상
Stage name
Hangul
미상
Dharma name
Hangul
미상
Posthumous name
Hangul
미상
{{{othername1}}}
Hangul
미상
concluding text

Usage

  • Requires one of the following fields: <hangul, hanja, rr, mr>. Cancels everything otherwise.
  • If child=yes, an infobox header will be created by the caller. Otherwise, calls Template:Infobox Korea/Header using <headercolor, title, image, caption>
  • If exists one of <hangulXX, hanjaXX>, where XX=ho(pen), ja(courtesy), born(childhood), a(birth), stage, gye(dharma), ph(posthumous)
    calls Template:Infobox Korea/Both_Koreas using hangulXX, hanjaXX, rrXX, mrXX
  • If exists one of <hangulNN, hanjaNN>, where NN=1, 2, 3
    calls Template:Infobox Korea/Both_Koreas using othernameNN, hangulNN, hanjaNN, rrNN, mrNN

Example

{{Template:Infobox Korea
|title=Instructions for use
|image=File:Kim_Hongdo-Mountain.jpg
|caption= 산수화
|hangul=사용 지침
|rr= sayong jichim
|mr=Chosŏn'gŭl
|hanja=使用说明
|hangulho=미상
|rrho=misang
|hangulja=미상
|hangulborn=미상
|hangula=미상
|hangulstage=미상
|hangulgye=미상
|hangulph=미상
|hangul1=미상
|text=<small>concluding text</small>
}}

Templates called as subprocedures

Include versus Noinclude

As is, the <noinclude> version produces nothing. Therefore, the <includeonly>...</includeonly> structures of the former versions have been replaced by their arguments. And now, the functionality of the <noinclude> version is obtained by simply calling the template from the doc.