I am using contentful. In one of the content model, I want to display dynamic value based on the option selected.
e.g. In contentful, I am having message as: Congratulations, your <USER_TYPE> account has created successfully.
I have options as admin/moderator/user then if
How can I replace <USER_TYPE> with the selected values? Please guide.
I got the answer.
In contentful, put the variable as {{ variable_name }} and in the code replace that variable_name with dynamic value as:
import Mustache from 'mustache';
Mustache.render(value, {variable_name: variable_value});
I am using vueJs, so this implementation refers javascript.