1

I am currently struggeling a bit with understanding the capabilities of the JSON Variants in SXA.

We are on SXA 9.3 and I want to make some customizations to the JSON representation with a JSON variant.

On this page, there is a brief documentation for all the types of fields, you can use within a JSON Variant.

If I did not misunderstand, there should be a way with "JSON Template" to also use Scriban within a JSON Variant, however I am unable to get anything rendered here.

I tried templates with the simplest content, e.g. "test" or only curly brackets "{}" but I do not get any output.

My guess is, that the template has to follow a specific syntax or that it might only work in combination with another type of field, but I don't see that in the doc.

Has someone used Scriban templates in JSON Variants before and could give me a nudge into the right direction?

Hope I described in an understandable way :)

Cheers, Simon

1 Answer 1

1

I created a support request and got the response, that within JSON variants the JSON Template is only supported from version 10.2 onwards.

https://dev.sitecore.net/Downloads/Sitecore%20Experience%20Accelerator/10x/Sitecore%20Experience%20Accelerator%201020/Release%20Notes

"You can now use Scriban templates in JSON variants. 483214"

Since we are on extended support with 9.3 now, there will not be a fix for this. They created a change request for the documentation to remove the fields now to prevent confusion.

So I was chasing a ghost after all.

Cheers, Simon

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.