Closed frankbits closed 1 year ago
Will check.
Well, I didn’t include the template support for value_field
because it’s not mentioned in the Relation widget document other than {{slug}}
, but I’ll see if it can be done.
Ah ok... but for my use-case it's needed there... thanks for looking into it
Isn't only the {{}}
missing in the values
-replace?
src/lib/components/contents/details/widgets/relation/helper.js:92
labels[valueIndex] = labels[valueIndex].replaceAll(`{{${key}.${k}}}`, v);
values[valueIndex] = values[valueIndex].replaceAll(`${key}.${k}`, v);
I mean, the String-Template in value-field does get replaced correctly apart from the {{}}
, so it is already mostly included...
Deployed the fix 🚢
Thanks for testing!
Originally posted by @frankbits in https://github.com/sveltia/sveltia-cms/issues/19#issuecomment-1574907915
This also breaks how the current data is shown in the sveltia-UI after reopening the saved collection