Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Hunter Lyons Posted August 2, 2019 Posted August 2, 2019 I made a custom field call Information Box that is yes/no. In Pages I am using the following expression: {{if $record->customFieldDisplayByKey('info_box','display') == 1}} {{endif}} There is content inside the if statement. However, it does not display the content regardless of whether or not I turn the ticker on/off for an article. I am using the correct reference to the field and have been trying to get this to work for a few days now. How can I fix this? I am following the advice in the template syntax help guide.
newbie LAC Posted August 3, 2019 Posted August 3, 2019 8 hours ago, Lyonharted said: ','display') The value depends on the setting If you want compare value with 0/1 use the raw {{if $record->customFieldDisplayByKey('info_box','raw') == 1}} {{endif}}
Hunter Lyons Posted August 3, 2019 Author Posted August 3, 2019 That worked! Weirdly enough, with == 1, it did not work, but I removed == 1... and for some reason this expression worked: {{if $record->customFieldDisplayByKey('info_box','raw')}} {{endif}}
Recommended Posts
Archived
This topic is now archived and is closed to further replies.