Jump to content

Template:Display image: Difference between revisions

From Deep Politics Wiki
WikiSpooks>Robin
check the file exists
 
WikiBot (talk | contribs)
m Plain formatting, no semantic markup
 
Line 8: Line 8:
Usage:
Usage:
  <nowiki>{{</nowiki>{{PAGENAME}}|''Pagename''<nowiki>}}</nowiki></noinclude><includeonly>{{#if: {{{1|}}}|
  <nowiki>{{</nowiki>{{PAGENAME}}|''Pagename''<nowiki>}}</nowiki></noinclude><includeonly>{{#if: {{{1|}}}|
{{#ifexpr: {{#ask:[[-Has logo::{{{1}}}]]|format=count}}>0|{{#ifexist: {{#show: {{{1}}}|?Has logo2}}|{{#show: {{{1}}} |?Has logo2}}|{{Display image/image|{{{1|}}}}}}}|{{Display image/image|{{{1|}}}|}}}}}}</includeonly>
{{#ifexpr: >0|{{#ifexist: ||{{Display image/image|{{{1|}}}}}}}|{{Display image/image|{{{1|}}}|}}}}}}</includeonly>

Latest revision as of 22:34, 24 September 2026

This is a semantic utility template to allocate Property:Display image.
It may call the other templates Template:Display image/image and Template:Display class icon.
The logic is as follows:

  • If the page Has logo2, and that file exists, then use that.
  • Elseif the page Has image2, and that file exists, then use that.
  • Else use an icon derived from the page's Has objectClass2.

Usage:

{{Display image|Pagename}}