Topic on Project:Support desk

Display images in a query

5
Summary by Nanoukaplus

Use #if instead of #ifexist (too expensive)

Nanoukaplus (talkcontribs)

Hello,

I made a query to display images, but if I want more than 100 results in my page, the last images aren't displayed even if they exist.

Does someone know why ?

83.55.5.210 (talkcontribs)

I can't display the images

Nanoukaplus (talkcontribs)

Anybody has an answer ? :(

Malyacko (talkcontribs)

Please reply exact steps to reproduce the problem ("a query to display images" is a bit vague) and MediaWiki version information.

Nanoukaplus (talkcontribs)

On my page I have this code :

{{#ask:|mainlabel=-|?=Objet|?photo droite=Photo|?ref dossier=ref dossier|sort=Modification date|format=template|introtemplate=Header accueil objets|template=Accueil objets|outrotemplate=Table footer|default=Aucun objet existant avec ces critères|named args=yes}}

and on my template "Accueil objets" there is

<nowiki><includeonly>|{{{?Objet}}}|{{#ifexist: File:{{{?Photo}}}|[[File:{{{?Photo}}}|150px]]|Fichier inexistant}}|{{{ref dossier}}}</nowiki>

and I use MediaWIki1.21.2