Skip to content

Instantly share code, notes, and snippets.

@David-Bates
Created October 8, 2016 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save David-Bates/f8be5b9d3b85ec07e58b4c1dd2e8594a to your computer and use it in GitHub Desktop.
Save David-Bates/f8be5b9d3b85ec07e58b4c1dd2e8594a to your computer and use it in GitHub Desktop.
This is the readible (un-minified) version of the album infobox small album art section.
<div class="hiddenStructure
{{#ifexist:
{{#vardefineecho:filePath|
File:{{#sub:{{BASEPAGENAME}}|6|2}}-front-small.jpg
}}
| true
{{#vardefine:shortName|
{{#explode:{{BASEPAGENAME}}|:|0}}
}}
{{#vardefineecho:SfilePath|
[[:File:{{#sub:{{#explode:{{#var:shortName}}| |0}}||1}}
{{#sub:{{#explode:{{#var:shortName}}| |1}}||1}}
{{#sub:{{#explode:{{#var:shortName}}| |2}}||1}}
{{#sub:{{#explode:{{#var:shortName}}| |3}}||1}}
{{#sub:{{#explode:{{#var:shortName}}| |4}}||1}}
{{#sub:{{#explode:{{#var:shortName}}| |5}}||1}}-front-small.jpg]]
}}
| false }}
" style="clear:left;font-size:10px;text-align:center;">
<div style="width:125px;float:left;text-align:left;">Small Album Art</div>
<div style="width:125px;float:left;text-align:right;">
[[
{{#ifeq:{{#varexists:SfilePath}}|1|{{#var:SfilePath}}|{{#var:filePath}}}}
|CD cover]]
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment