You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's pretty common to have route overrides in your plenti.json config that use field values from your content source, for example:
"routes": {
"pages": ":fields(url)"
},
The downside is that if the url field is left blank, it could conflict with the homepage route and cause issues. One solution would be to make it a required field (#325). Alternatively, we could provide an "or" fallback option like:
The logic being, if any evaluated value (anything between ( and ), in this case url) is blank (or determined to not be valid for a URL), then use the "or" case instead. This would apply to all evaluated values in a chain, for example if the route override was /:fields(first_name)/:fields(last_name) it would use the "or" case if either first_name or last_name was blank.
The text was updated successfully, but these errors were encountered:
It's pretty common to have route overrides in your
plenti.json
config that use field values from your content source, for example:The downside is that if the
url
field is left blank, it could conflict with the homepage route and cause issues. One solution would be to make it a required field (#325). Alternatively, we could provide an "or" fallback option like:The logic being, if any evaluated value (anything between
(
and)
, in this caseurl
) is blank (or determined to not be valid for a URL), then use the "or" case instead. This would apply to all evaluated values in a chain, for example if the route override was/:fields(first_name)/:fields(last_name)
it would use the "or" case if eitherfirst_name
orlast_name
was blank.The text was updated successfully, but these errors were encountered: