3

Is there is way to remove or rename a field in Sitecore JSS via template definitions?

Even with an ID on the field, it won't rename. Deleting the field object will not delete the field in Sitecore.

We want to use code-first templates, but this could give some problems.

3

Import very specifically does not rename or delete items. Per the docs:

Import does not purge unknown items

If a template or route is removed from the manifest, it is not deleted from Sitecore on the next import.

If you want to follow default conventions and have Sitecore look entirely like your manifest and nothing else, consider using wipe import (-w on the CLI) which will purge imported items before recreating them all. Wipe will prompt by default; --unattendedWipe will disable the prompt for CI scenarios.

If you're going to get advanced with your items though, use an item serialization tool to maintain the app's state from the Sitecore side.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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