Small tweak for DD4T 2.2.1 templates to get result in XML

In one of my previous blogs, I did mentioned steps to upgrade DD4T templates in CMS. And, this blog talks a bit more about it and issue which I faced after upgrading templates.

Issue: DD4T 2.2.1 templates returns data in JSON format by default because of which after publishing components, data was not populated since application was expected XML format.

Fix: To fix this issue, we did a small tweak to these DD4T templates.

  • Open “Generate dynamic component” schema and navigate to Design tab.


  • Click on Add to add a field “SerializtionFormat” with dropdown list that enables option to choose XML or JSON return type.



  • Save and close the schema.
  • Open SDL Web template Builder and open the component template that needs to be updated. In below example I am using “Default Dynamic Component Actions”



  • On opening the template, now you can a field “Serialization Format” which we added in the schema. Chose the option that expected.


    This is the small tweak that I did to get the desired thing.

    I would like to thank Sayantan Basu who helped me in this.