iJeff Posted August 5, 2018 Share Posted August 5, 2018 Hi, I have field in pages, which upload the logo (image), however it's only for pro members, for other members it's now showing missing image icon, i am trying to use the if condition but it's not working out as below., can you please help {{if $value }} <img src='{$value}' width='100'/> {{else}} <!-- no --> {{endif}} Link to comment Share on other sites More sharing options...
opentype Posted August 5, 2018 Share Posted August 5, 2018 Pages fields have individual permission. You should be able to just change those without the need for any custom code. Link to comment Share on other sites More sharing options...
iJeff Posted August 5, 2018 Author Share Posted August 5, 2018 3 minutes ago, opentype said: Pages fields have individual permission. You should be able to just change those without the need for any custom code. I have uploaded the screenshot to explain the problem. where logo is not uploaded it's showing missing image icon. Link to comment Share on other sites More sharing options...
opentype Posted August 5, 2018 Share Posted August 5, 2018 Check for $formValue, not $value. The latter is a prepared output, which can contain stuff even for empty records. Link to comment Share on other sites More sharing options...
iJeff Posted August 5, 2018 Author Share Posted August 5, 2018 3 minutes ago, opentype said: Check for $formValue, not $value. The latter is a prepared output, which can contain stuff even for empty records. {{if $formValue }} <br><img src='{$value}' width='100'/> {{else}} {{endif}} it did the trick thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.