inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Oct 29, 2017 4:47:06 GMT -8
So site for reference: sehnsucht.boards.net/user/1This is the code controlling the large avatar: <img src="{foreach $[user.custom_field]}{if $[user.custom_field.name] == "Large Avatar"}$[user.custom_field.value]{else}http://placehold.it/250x250{/if}{/foreach}" class="large-avatar-Image"/> I do have an image url set for the Large Avatar field, but its constantly defaulting to the 'else' option. Anyone able to help?
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Oct 29, 2017 12:30:19 GMT -8
Its because you cannot specify an if value > if no value since it doesn’t exist until the field is populated.
Instead, try specifying a background image for that div which is then hidden by the img src provided by the custom field when it’s filled out.
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Oct 29, 2017 22:17:09 GMT -8
Its because you cannot specify an if value > if no value since it doesn’t exist until the field is populated.
Instead, try specifying a background image for that div which is then hidden by the img src provided by the custom field when it’s filled out. Thanks Kami!
|
|