Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Templates vs Fragments


Former Community Member


We are currently in the process of converting all of our manual forms/documents into live interactive forms using LiveCycle designer however the question has been raised "How can we create components that are going to be the same across all documents and copied and pasted?" I suggested fragments however the debate is whether it would be best to use a 'template' that perhaps we've designed and use it for each form? I understand that Livecycle have inbuilt templates but we won't be using those and if we create a template it won't automatically update those sections that are used across a number of forms?

The real issue is that we've got suite's of forms so for each form or document we could have up to three version with varying elements even though they be it slight. The header/footer etc will be the same throughout every form it is just going to be the specific information that will need to change.

My initial thought would be to create a Master Page with the fragments on it that are going to be 'standard' across the board and have a fragment library of every other component that will need to be different, is that the best way? I am more than happy to take all suggestions as we need to get this right and have a lot of variables with our forms and documents so need to get it right in the beginning.

The only other thought I had would be to create an entire library of every fragment we will need and label accordingly and once a document is opened (to be created) the fragments can be used as needed and if the form is relatively similar to the next one you can save as and than apply the changes and the fragments will stay the same?

Can fragments be a scripted fragment i.e a table of calculations for tracking kilometres travelled (we reimburse them for these)?

Thank you in advance for any thoughts/suggestions/ideas.

3 Replies


Level 6

Fragments can quickly become a pile of nothing if not prepared and well-thought out so it's a good thing you're exploring these ideas upfront.

That being said, what's more important...ease of editing document assets across the board, or starting with a template? When you think about it, it's somewhat one-in-the-same depending on how you plan/execute the design (i.e. a fragment can serve as a template). As I read your post, I also thought about using the fragment on the Master Page (i.e the header and footer info which should remain the same across the board), then using the Design space for the actual design.

I guess what I don't understand is what you foresee achieving with a "template" that you can't accomplish with a fragment. Trust me, fragments can get annoying and cumbersome  if you try to make one for every use case as you may end up using it only once. Then management of those fragments will become your enemy...haha.

I'd say the best way to figure it out is to actually start designing. I believe at that point you'll learn what works and doesn't work and that will hopefully help shape your final plan of attack!

I myself tend to be an "over-thinker" and these two quotes from General George Patton have helped me in many areas of life (even design). By all means you're doing great by planning, but I think testig may work best and anser some of your questions considering you appear to have a good working knowledge of LC Designer.

"A good plan, violently executed now, is better than a perfect plan next week."

"A good solution applied with vigor now is better than a perfect solution applied ten minutes later."


Former Community Member

Hello SI_MSD7,

Thank you for replying. It makes a lot of sense. We are only going to create fragments for those components that will be used multiple times for the simple fact of updating globally.

The reason I was thinking we should probably use a template is so that the fragments that will be across the board standard i.e. logo's header footer etc they will be in position on that document whereas using a fragment each time you want to create a new document may see the positioning change and therefore create a less consistent appearance for the entire suite of forms we're creating. Does that make sense?

Not being on the project team for these live forms it can't dictate when the design element starts so for now I've been asked to investigate the best approach to take so that when the team of designers (5 of us) get to work we are all using the same method and processes and library of fragments.

Those quotes are fantastic, thank you.

With fragments being stored on a communal site for all of us 5 to use, what is the best way to save all of them there as we are all responsible for developing the fragments, templates and forms.

Thank you again, I look forward to your reply. 


Level 7

There is no reason that you cannot use templates and fragments in combination. Templates can be used to speed up design of forms which contain common combination of fragments and artwork, e.g. a particular letterhead, or forms that have differing master pages. In your example, the positioning (where) of the objects (i.e. fragments) would be handled by the template, but what those positioned objects are could be handled by the fragments. Note that forms based on templates do not update when the template changes, while fragments will reload every time the document is opened in Designer.