TransWikia.com

Purpose of templates.json and schemas.json

Tridion Asked by Atila Sos on September 30, 2021

In normal cases (and in the example website), the Publish Settings in DXA will result in a [ModuleName].schemas.json and [ModuleName].templates.json inside of "/system/config/" folder, but this only happens if the Schemas and (dynamic) Component Templates are inside the "Modules" Folder. This is hardcoded in the templating solution.

Because I have my Schemas and Templates defined in a different folder (because it’s an earlier implementation), I do not have these files. My implementation is working correctly, but I want to make sure that these files are not needed by some (hidden) functionality in DXA. Can someone shed some light on their purpose?

One Answer

The DXA Framework itself doesn't use these configuration files, but Module implementation may.

For example, the Core Module's ContentList View Model uses it to map a Schema name to ID (used to do a Broker Query). See https://github.com/sdl/dxa-modules/blob/master/webapp-net/Core/Models/Entity/ContentList.cs

In general, DXA expects that on CM side, all Module-specific Schemas and Templates are in the Module's subtree under the /{Root}/Modules folder. It then creates Module-specific config files called {Module}.xyz.json

Correct answer by Rick Pannekoek on September 30, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP