Log in Sign up

Custom Metadata Defaults

If I'm using custom metadata, is there a way to set a default in the template?


3 years ago, 1 replies   Edit question

Yes, let's say you are using the custom metadata key Author for this example. In your template you would do the following:


{{#entry.metadata.author}}
  Written by {{entry.metadata.author}}
{{/entry.metadata.author}}

{{^entry.metadata.author}}
  Written by the Editorial Board
{{/entry.metadata.author}}

This involves a Mustache inverted section. Please let me know if you have any questions about this or anything else.

Answered 3 years ago ยท Edit answer