I have a custom token %tokenname%
in single line text
and richtext
fields. I would like to replace the token with some custom value in the Sitecore JSON rendering
. Please see some example data below:
{
"uid": "04f1b740-1eff-415e-a1c3-93bce2c2a274",
"componentName": "GeneralContent",
"dataSource": "{0F766E67-7341-4155-B53F-5BEA598C8C24}",
"fields": {
"Subheading": {
"value": ""
},
"Body": {
"value": "This is the %tokenname% I would like to buy"
},
"Heading": {
"value": "Limited to number of %tokenname% to buy."
}
}
}
Just wondering where can I do that. I tried with Sitecore.Pipelines.RenderField
pipeline which doesn't work. Is that because I can't use it for JSON Rendering
which is different from the traditional Sitecore MVC Controller Rendering
?