Page 2 of 2

Show icon based on database value

Posted: Thu Aug 07, 2014 6:45 pm
by Evgene Karachevtsev

Hello Adrian,

Could you please clarify, what exactly doesn't work? The image does not display? Could you please check is a path to it correct? Could you please try upload these images in Media Manager, and then modify your code to:
prevar src;
if (value == 'Advice') src = "Help";
if (value == 'Dispute') src = "Argue";
if (value == 'Humor') src = "Funny";
return Appery.getImagePath(src);/pre


Show icon based on database value

Posted: Thu Aug 07, 2014 7:06 pm
by Adrian Stoch

Ok, that fixed it. Thanks a bunch Evgene.

For future reference, the solution was to upload the images to media manager and then the path code looks like:
"files/views/assets/image/Funny.png"