Migrate Content Fragment Templates to Models? | Community
Skip to main content
Level 2
September 21, 2023

Migrate Content Fragment Templates to Models?

We have hundreds of content fragments based on templates (mainly the Simple Fragment).  They are referenced on hundreds of pages.  As we create new fragments, we are basing them on models.  However, is it necessary to covert all the existing fragments to use a content fragment model instead of Simple Fragment?

8 replies

BrianKasingli
New Participant
September 22, 2023

You can write a migration script that would create new content fragments based on the interface that you have created in your content fragment model. 

Translate
user06081Author
Level 2
September 22, 2023

This is what I am hoping to avoid. I suppose if I save the text, delete the existing fragment based on template, then create a new one based on model with same name, I would not have to update the reference within the pages themselves.  Still a lot of work.

Translate
Preetpal_Bindra
New Participant
September 21, 2023

Hello @user06081 ,

What is your question? Are you trying to analyze how to replace the association of existing Simple template on the existing fragments with a new custom Fragment model?

 

thanks,

Preetpal

Translate
user06081Author
Level 2
September 22, 2023

Yes or whether that is necessary.

Translate
ManviSharma
Employee
September 21, 2023

HI,

 

Converting existing "Simple Fragment" content fragments to content fragment models is not strictly required but offers advantages in content structure, consistency, and authoring experience. 

Translate
user06081Author
Level 2
September 21, 2023

But the simple fragments should continue to work in future versions, correct?

Translate