Skip to main content
Updating based on the user comments and provide some feedback as well.
Source Link
Shiva
  • 2.2k
  • 11
  • 19

Yes, it is possible to use the same CT for multiple components (based on a single schema), per ViewModel though.

It is sufficient to built one component template for every view model that you have. In Tridion, you will continue to use the same TBBs with your CT unless component template metadata is different based on your entity or view. You can add more TBBs to suit your requirement but the output should be "JSON".

Refer an useful article from Albert here

You will offcourse have to add your schemas to the linked schemas within the CT in Tridion.

Update

Well, I am having trouble interpreting your snapshot but I would like to point out that you would need one View Model for every schema that you built. Based on the code that you have below, you are missing the getter / setter methods for each of the fields that you have defined for your schema.

I think I already sent the article in another response to your other question but the following diagram (from Raimond's post) explains a lot.

I would appreciate if you can update your question with the code in comments and try to come up with clarification so that the community can address.

Yes, it is possible to use the same CT for multiple components (based on a single schema), per ViewModel though.

It is sufficient to built one component template for every view model that you have. In Tridion, you will continue to use the same TBBs with your CT unless component template metadata is different based on your entity or view. You can add more TBBs to suit your requirement but the output should be "JSON".

Refer an useful article from Albert here

You will offcourse have to add your schemas to the linked schemas within the CT in Tridion.

Yes, it is possible to use the same CT for multiple components (based on a single schema), per ViewModel though.

It is sufficient to built one component template for every view model that you have. In Tridion, you will continue to use the same TBBs with your CT unless component template metadata is different based on your entity or view. You can add more TBBs to suit your requirement but the output should be "JSON".

Refer an useful article from Albert here

You will offcourse have to add your schemas to the linked schemas within the CT in Tridion.

Update

Well, I am having trouble interpreting your snapshot but I would like to point out that you would need one View Model for every schema that you built. Based on the code that you have below, you are missing the getter / setter methods for each of the fields that you have defined for your schema.

I think I already sent the article in another response to your other question but the following diagram (from Raimond's post) explains a lot.

I would appreciate if you can update your question with the code in comments and try to come up with clarification so that the community can address.

Added link to Alberts documentation
Source Link
Shiva
  • 2.2k
  • 11
  • 19

Yes, it is possible to use the same CT for multiple components (based on a single schema), per ViewModel though.

It is sufficient to built one component template for every view model that you have. In Tridion, you will continue to use the same TBBs namely "Render Component Content" and "Default Component Template Finish Actions" butwith your CT unless component template metadata may beis different based on your entity, controller or regionview. You can add more TBBs to suit your requirement but the output should be "JSON".

Refer an useful article from Albert here

You will offcourse have to add your schemas to the linked schemas within the CT in Tridion.

Hope it helps!

Yes, it is possible to use the same CT for multiple components (based on a single schema), per ViewModel though.

It is sufficient to built one component template for every view model that you have. In Tridion, you will continue to use the same TBBs namely "Render Component Content" and "Default Component Template Finish Actions" but your component template metadata may be different based on your entity, controller or region. You can add more TBBs to suit your requirement but the output should be "JSON".

You will offcourse have to add your schemas to the linked schemas within the CT in Tridion.

Hope it helps!

Yes, it is possible to use the same CT for multiple components (based on a single schema), per ViewModel though.

It is sufficient to built one component template for every view model that you have. In Tridion, you will continue to use the same TBBs with your CT unless component template metadata is different based on your entity or view. You can add more TBBs to suit your requirement but the output should be "JSON".

Refer an useful article from Albert here

You will offcourse have to add your schemas to the linked schemas within the CT in Tridion.

Source Link
Shiva
  • 2.2k
  • 11
  • 19

Yes, it is possible to use the same CT for multiple components (based on a single schema), per ViewModel though.

It is sufficient to built one component template for every view model that you have. In Tridion, you will continue to use the same TBBs namely "Render Component Content" and "Default Component Template Finish Actions" but your component template metadata may be different based on your entity, controller or region. You can add more TBBs to suit your requirement but the output should be "JSON".

You will offcourse have to add your schemas to the linked schemas within the CT in Tridion.

Hope it helps!