Jump to content

Template:Infobox RP: Difference between revisions

From BadWolfMC Wiki
No edit summary
No edit summary
Line 14: Line 14:
<!-- DOWNLOAD (robust to either a bare URL or prebuilt link) -->
<!-- DOWNLOAD (robust to either a bare URL or prebuilt link) -->
|above = {{#if:{{{download_url|}}}|
|above = {{#if:{{{download_url|}}}|
   <!-- Case A: looks like a bare URL (http/https and no opening bracket) -->
   <div style="text-align:center; margin:6px 0 0;">
  {{#if:{{#ifexpr: {{#pos:{{{download_url}}}|[}} < 0 |1|}}
     <span class="plainlinks">
     | <span class="plainlinks">[{{{download_url}}} <span class="mw-ui-button mw-ui-progressive">{{#if:{{{download_label|}}}|{{{download_label}}}|Download}}</span>]</span>
      <a class="mw-ui-button mw-ui-progressive"
    | <!-- Case B: already a wikitext link (e.g., from {{ext-link}}) — render as-is to avoid double-wrapping -->
        href="{{{download_url}}}">
      <span class="plainlinks mw-ui-button mw-ui-progressive">{{{download_url}}}</span>
        {{#if:{{{download_label|}}}|{{{download_label}}}|Download}}
  }}
      </a>
    </span>
  </div>
}}
}}



Revision as of 08:46, 1 November 2025