Template:Info: Difference between revisions

From koreapedia
Spinster (talk | contribs)
Created page with "<noinclude> <!-- Template:Infobox — HTML-based, safe version, now supports image URLs --> </noinclude> <table class="infobox"> <tr> <th class="infobox-title" colspan="2">{{{title|{{PAGENAME}}}}}</th> </tr> {{#if:{{{image|}}}| <tr> <td class="infobox-image" colspan="2" style="text-align:center;"> <img src="{{{image}}}" alt="{{{caption|}}}" style="max-width:280px;"/> </td> </tr> }} {{#if:{{{caption|}}}| <tr> <td class="infobox-capt..."
 
Spinster (talk | contribs)
m Spinster moved page Template:Infobyfahad to Template:Info: Misspelled title
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<!-- Template:Infobox — HTML-based, safe version, now supports image URLs -->
</noinclude>
<table class="infobox">
  <tr>
    <th class="infobox-title" colspan="2">{{{title|{{PAGENAME}}}}}</th>
  </tr>


  {{#if:{{{image|}}}|
  <tr>
    <td class="infobox-image" colspan="2" style="text-align:center;">
      <img src="{{{image}}}" alt="{{{caption|}}}" style="max-width:280px;"/>
    </td>
  </tr>
  }}
  {{#if:{{{caption|}}}|
  <tr>
    <td class="infobox-caption" colspan="2">{{{caption}}}</td>
  </tr>
  }}
  {{#if:{{{label1|}}}{{{data1|}}}|
  <tr>
    <th class="infobox-label">{{{label1}}}</th>
    <td class="infobox-data">{{{data1}}}</td>
  </tr>
  }}
  {{#if:{{{label2|}}}{{{data2|}}}|
  <tr>
    <th class="infobox-label">{{{label2}}}</th>
    <td class="infobox-data">{{{data2}}}</td>
  </tr>
  }}
  {{#if:{{{label3|}}}{{{data3|}}}|
  <tr>
    <th class="infobox-label">{{{label3}}}</th>
    <td class="infobox-data">{{{data3}}}</td>
  </tr>
  }}
  {{#if:{{{label4|}}}{{{data4|}}}|
  <tr>
    <th class="infobox-label">{{{label4}}}</th>
    <td class="infobox-data">{{{data4}}}</td>
  </tr>
  }}
  {{#if:{{{label5|}}}{{{data5|}}}|
  <tr>
    <th class="infobox-label">{{{label5}}}</th>
    <td class="infobox-data">{{{data5}}}</td>
  </tr>
  }}
  {{#if:{{{label6|}}}{{{data6|}}}|
  <tr>
    <th class="infobox-label">{{{label6}}}</th>
    <td class="infobox-data">{{{data6}}}</td>
  </tr>
  }}
  {{#if:{{{label7|}}}{{{data7|}}}|
  <tr>
    <th class="infobox-label">{{{label7}}}</th>
    <td class="infobox-data">{{{data7}}}</td>
  </tr>
  }}
  {{#if:{{{label8|}}}{{{data8|}}}|
  <tr>
    <th class="infobox-label">{{{label8}}}</th>
    <td class="infobox-data">{{{data8}}}</td>
  </tr>
  }}
  {{#if:{{{label9|}}}{{{data9|}}}|
  <tr>
    <th class="infobox-label">{{{label9}}}</th>
    <td class="infobox-data">{{{data9}}}</td>
  </tr>
  }}
  {{#if:{{{label10|}}}{{{data10|}}}|
  <tr>
    <th class="infobox-label">{{{label10}}}</th>
    <td class="infobox-data">{{{data10}}}</td>
  </tr>
  }}
</table>
<noinclude>
== TemplateData ==
<templatedata>
{
  "description": "HTML-based infobox with optional image/caption and up to 10 label/data rows. Now supports image URLs.",
  "params": {
    "title":  {"label":"Title","type":"string"},
    "image":  {"label":"Image URL (e.g., https://example.com/image.jpg)","type":"string"},
    "caption": {"label":"Image caption","type":"string"},
    "label1":  {"label":"Row 1 label","type":"string"},  "data1":  {"label":"Row 1 value","type":"string"},
    "label2":  {"label":"Row 2 label","type":"string"},  "data2":  {"label":"Row 2 value","type":"string"},
    "label3":  {"label":"Row 3 label","type":"string"},  "data3":  {"label":"Row 3 value","type":"string"},
    "label4":  {"label":"Row 4 label","type":"string"},  "data4":  {"label":"Row 4 value","type":"string"},
    "label5":  {"label":"Row 5 label","type":"string"},  "data5":  {"label":"Row 5 value","type":"string"},
    "label6":  {"label":"Row 6 label","type":"string"},  "data6":  {"label":"Row 6 value","type":"string"},
    "label7":  {"label":"Row 7 label","type":"string"},  "data7":  {"label":"Row 7 value","type":"string"},
    "label8":  {"label":"Row 8 label","type":"string"},  "data8":  {"label":"Row 8 value","type":"string"},
    "label9":  {"label":"Row 9 label","type":"string"},  "data9":  {"label":"Row 9 value","type":"string"},
    "label10": {"label":"Row 10 label","type":"string"}, "data10": {"label":"Row 10 value","type":"string"}
  }
}
</templatedata>
== Usage ==
<pre>
{{Infobox
| title  = Koreapedia
| image  = https://example.com/image.jpg
| caption = Official logo
| label1  = Founded      | data1 = 2024
| label2  = Type        | data2 = Online encyclopedia
| label3  = Headquarters | data3 = Seoul, South Korea
}}
</pre>
</noinclude>

Latest revision as of 19:59, 8 October 2025