- Description:
This key toggles whether CloudCannon will treat repeating snippets as optional when parsing snippet parameters.
Setting this key to
truewill make the repeating snippet instances optional, allowing snippets to match even when no instances are present.By default, this key is
false(i.e., at least one instance is required).- Appears in:
- Type:
boolean- Examples:
In this example, we have configured repeating parser to treat instances as optional.
Copied to clipboard_snippets: example: snippet: <<example [[repeating_content]]>> params: repeating_content: parser: repeating options: snippet: content optional: true{ "_snippets": { "example": { "snippet": "<<example [[repeating_content]]>>", "params": { "repeating_content": { "parser": "repeating", "options": { "snippet": "content", "optional": true } } } } } }