Jump to content

if/else custom profile fields


DaisyB
 Share

Recommended Posts

Hi there! I'm playing around with the custom profile fields and am trying to use the invision tutorial to get my select box profile fields to show a different graphic (badge), depending on what people select. I'm following the link that invision provides when you edit custom fields in the ACP (here), but for whatever reason, I'm not able to get it to work. Would someone mind telling me what I'm missing (I know in this sample the graphics don't make sense - I'm just testing things out with what I have!) 

{{if [harry]}} <img src="https://k.nickpic.host/bTjCax.png">
{{elseif [ginny]}} <img src="https://k.nickpic.host/bTjQiN.png">
{{elseif [ron]}} <img src="https://k.nickpic.host/bTjU2O.png">
{{endif}}

 

I was able to get a graphic to show up for the 'harry' selection, but when I tested it out with 'ginny', I got the same graphic as the harry one. Any ideas? If not, it's not a huge deal, but it would be cool if this worked! Thank you, and have a wonderful new year! 

 

Edit: lol, tried it again and fixed my own problem! 😛 It should have been {{if ($content=='harry')}} etc, etc. 

Edited by DaisyB
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...