Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tyler Buchanan 5 posts 85 karma points
    May 28, 2019 @ 16:21
    Tyler Buchanan
    0

    Set Default for Template Field on Nested Content

    So I'm trying to default the "Template" field in the nested content data type when that particular field is empty. So when the field is set to {{headline}} but headline is empty on the content, it would default so something like "Content Block". Is this possible?

  • Niels Odgaard 14 posts 155 karma points
    May 29, 2019 @ 19:03
    Niels Odgaard
    101

    You should be able to do something like {{headline ? headline : 'Content Block'}} so default value is Content Block and when headline is set that'll be used instead :-)

  • Tyler Buchanan 5 posts 85 karma points
    May 29, 2019 @ 19:19
    Tyler Buchanan
    0

    Thanks! Wasn't aware you could use ternary statements here!

Please Sign in or register to post replies

Write your reply to:

Draft