Jump to content

Template:Infobox RP: Difference between revisions

From BadWolfMC Wiki
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{Infobox
<includeonly>{{Infobox
|name         =  
|name       =  
|bodystyle   =  
|bodystyle =  
|title       = {{#if:{{{title|}}}|{{{title}}}|BadWolfMC Resource Pack}}
|title     = {{#if:{{{title|}}}|{{{title}}}|BadWolfMC Resource Pack}}
|titlestyle   =  
|titlestyle =  


<!-- Optional image -->
|image     = {{#if:{{{image|}}}|[[File:{{{image}}}|alt={{{image_alt|}}}]]|}}
|image       = [[File:{{{image|}}}|250px]]
|imagestyle =  
|imagestyle   =  
|caption   = {{{image_caption|}}}
|caption     = {{{image_caption|}}}
|captionstyle =  
|captionstyle =  


|datastyle   =  
|datastyle =  


<!-- Download button (optional) — uses native mw-ui button classes -->
<!-- DOWNLOAD (robust to either a bare URL or prebuilt link) -->
|above = {{#if:{{{download_url|}}}|
|above = {{#if:{{{download_url|}}}|
   <span class="plainlinks">[{{{download_url}}}
   <!-- Case A: looks like a bare URL (http/https and no opening bracket) -->
    <span class="mw-ui-button mw-ui-progressive">
  {{#if:{{#ifexpr: {{#pos:{{{download_url}}}|[}} < 0 |1|}}
      {{#if:{{{download_label|}}}|{{{download_label}}}|Download}}
    | <span class="plainlinks">[{{{download_url}}} <span class="mw-ui-button mw-ui-progressive">{{#if:{{{download_label|}}}|{{{download_label}}}|Download}}</span>]</span>
    </span>]
    | <!-- Case B: already a wikitext link (e.g., from {{ext-link}}) — render as-is to avoid double-wrapping -->
  </span>
      <span class="plainlinks mw-ui-button mw-ui-progressive">{{{download_url}}}</span>
  }}
}}
}}


|header1 = Resource Pack
|header1 = Resource Pack


|label2  = {{#if:{{{rp_version|}}}|RP Version|}}
|label2  = {{#if:{{{rp_version|}}}|Version|}}
|data2  = {{{rp_version|}}}
|data2  = {{{rp_version|}}}



Revision as of 08:37, 1 November 2025