Template:Navbox/IconExternal: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{#if: {{{link|}}} | {{#vardefine:pagelink| {{{link}}} }} | {{#vardefine:pagelink| | <includeonly> | ||
{{#if: {{{link|}}} | |||
| {{#vardefine:pagelink| {{{link}}} }} | |||
| {{#vardefine:pagelink| {{{subpage|{{{text|}}} }}} }} | |||
}} | |||
<span style="text-align:center; float:left; overflow:hidden; margin-left:1px; margin-right:1px;"> | |||
<div> | |||
{{#if: {{#pos: {{#var:pagelink}} | http}} <!-- Check if 'pagelink' starts with 'http' --> | |||
| {{{text|}}} <!-- Display just the text for external links --> | |||
| [[File:{{{image}}} | {{{width|{{#var:iconwidth}}}}}x{{{height|{{#var:iconheight}}}}}px | link={{#var:pagelink}} ]] <!-- Internal link with image --> | |||
}} | |||
</div> | |||
{{#if: {{{text|}}} | |||
| <div style="line-height:1; text-align:center; font-size:{{{textsize|{{#var:textsize}}}}}em; width:{{{textwidth|{{#var:textwidth}}}}}px; height:{{#var:maxlines}}em; margin:auto"> | |||
{{#if: {{#pos: {{#var:pagelink}} | http}} <!-- Check if 'pagelink' starts with 'http' --> | |||
| [{{#var:pagelink}} {{{text}}}] <!-- External link --> | |||
| [[{{#var:pagelink}} | {{{text}}}]] <!-- Internal link --> | |||
}} | |||
</div> | |||
}} | |||
</span> | |||
</includeonly> |