Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Koper74 Posted August 29, 2019 Posted August 29, 2019 Hello, I use this syntax to set an upload-field (images only) when there is no content: {{if $formValue }} <img src="{$value}" class="ma_passbild"> {{else}} <img src="https://loremipsum.info/uploads/pages_media/0_avatar.png" class="ma_passbild"> {{endif}} It only works when the field is linked hardcoded via display template: <div class="passbild">{$record->customFieldDisplayByKey('foto', 'display')|raw}</div> In my listing template I've got to use it like this - unfortunately it doesn't work: {{foreach $row->customFieldsForDisplay('listing') as $fieldId => $fieldValue}} {{if $fieldValue}} {$fieldValue|raw} {{endif}} {{endforeach}} PHP is not my strength but I guess this part is the problem!? as $fieldId => $fieldValue}} I would be gratefull for any tips or ideas... 😉
Recommended Posts
Archived
This topic is now archived and is closed to further replies.