I would like to display on my site the same content, with the same data presentation, on different pages of my site, let’s say for example 10 times.
This content must be editable.
The rendering (display template) must also be editable.
This content will not be the only element on these pages, so I am excluding Display Page Templates.
What is the recommended solution?
Here are the options I have explored:
1 – Custom Fragment
I use a Custom Fragment with editable fields and configuration.
The fragment is responsible for both its data and its presentation.
Advantages:
- When entering content, you immediately see the rendering (WYSIWYG)
- If you change the page language, the fragment is displayed in the selected language
Disadvantages:
- The entered data is tied to the fragment: I have to input the same data 10 times
- If I change a label, I have to change it in all ten places
2 – Custom Fragment with Composition
As in solution 1, I use a Custom Fragment with editable fields and configuration.
I enter the data only once.
I place this instance in a container and save a composition.
Advantages:
- Same as solution 1 PLUS
- I only enter the data once, as long as I never modify it
Disadvantages:
- The composition is a snapshot at a given moment. It cannot be modified:
If I want to modify a single label, I once again need to change it 10 times
3 – Custom Fragment + Web Content Structure + Web Content Article + Mapping with the Fragment + Composition
In this solution:
I create a Web Content structure, for example with a title field and a description field.
I create an article, for example: “Title 1” and “Description 1”.
In my Custom Fragment, I map each field of the Web Content Article individually to the fragment’s editable fields.
Advantages:
- I enter the data only once thanks to Web Content
- Thanks to composition, the mappings between the article fields and the fragment’s editable fields are saved (at a given moment)
- If I modify the article data, the change is reflected across the ten instances of my fragment
Disadvantages:
- I have to map each field individually! If my structure contains 100 fields, I must create 100 mappings
- If I swap a mapping (for example, mapping the article title field to the fragment’s “description” editable field), I must again modify my 10 fragment instances because the composition cannot be edited
4 – Web Content Structure + Web Content Template + Web Content Article + Content Display Fragment
Advantages:
- I enter the data only once thanks to Web Content
- Thanks to the Web Content Template, the “mapping” is done automatically
- If I change the content of my article, it is reflected on every page using that article
- If I change the template, the change is reflected on all pages as well
Disadvantages:
- I lose WYSIWYG and instead fill out a form (Article input), which is less user-friendly
- Web Content is in MAINTENANCE mode
Based on my initial requirement, which solution is preferable?
Are there other solutions I may not have considered?
What is the recommended best practice?
Given the advantages and disadvantages of the solutions above, the last one seems the most appropriate for my needs.
What do you think?