If file blueprint field is not empty, print word via info: on parent files section's card

I have a file blueprint with an URL field.

If this URL field is not empty, I’d like the file card in the parent file section to show a word using info:.

Something like a ternary operator in the query language file.video.isnotempty?'video':''

Can this be done?

Should I write a custom method that does the logic and use {{file.video.customMethod}} ?

Thank you

Yep, you need a custom (field) method because you cannot use PHP logic in blueprints.

1 Like