Topic on Project:Support desk

[SOLVED] Check entered string in infobox

3
Till Kraemer (talkcontribs)

Hi,

I have an infobox template which looks like this: {{Infobox | Image = }}

I want to check the string entered by the user and add the category "Image needed" if the value is "Image needed.jpg".

I tried to add {{#if: {{{Image|Image needed.jpg}}} | [[Category:Image needed]] }} to the template, but of course this doesn't work since it only checks if the string is empty. Can I even fix my problem with the parser functions?

Thanks and cheers,

Fereal (talkcontribs)
Till Kraemer (talkcontribs)

Thanks a lot, Fereal! {{#ifeq: {{{Image}}} | Image needed.jpg | [[Category:Image needed]] | }} indeed works! :) (I only tried {{#if: {{{Image|Image needed.jpg}}} | [[Category:Image needed]] }} before, which didn't work).

Cheers,

Reply to "[SOLVED] Check entered string in infobox"