Template hierarchy by building blocks and inheritance [Change one, applies to all)


is it possible to build a template hierarchy with base templates and children inherit from it?
I’ve made a concept drawing of my thinking:

Through the search I’ve found different topics here, like Actually what is current status of template - child document inheritance? - #8 by eighty2
But I’m not certain if it’s the same way as I think of it.

What lead to the need of something like this is, that I have nearly 200 documents that were created over time. Each with a footer having the same content. If I need to change a value in the footer, I have to touch every single document and edit it. I want to prevent this in the future.

Thanks for your time and help.


Are your documents already “templated”?

Do you format them exclusively with styles with absolutely no direct formatting?

In your drawing, last two rows describe the standard usage of templates. I don’t see exactly the relationship between “Datasource” and “Building blocks”. Images can be stored in a specific directory but the need to be linked in the template, not included, so that automatic update occurs. Initial text in a template is never updated in derived documents (to avoid deletion of intentionally changed data).

Basically, only styles are updated when you modify a template. Footer contents is not a “style”; therefore it is not updated after template change.

There are two methods to build “dynamic” documents:

  • master + sub-documents
    Fits when subs are shared among various masters (e.g. clause collections for a contract): you change one of the subs and final document is updated when you next open the master.
  • database link
    Mail merge is a simplified form of the feature. However, this requires a careful organisation of both your data and documents.

Give more details on your documents and the kind of “updates” you want to apply to them.

1 Like

Me personally, I wish for recommendations like this one (at all places these are made) these to have a notice attached - take the stressing “absolutely no direct formatting” with pinch of salt. Caution: pinch needs to be of fair volume. This is namely the lesson which I did last weeks/few months. Not everything carrying the word Style in name is a style in fact. In course of my ongoing writing myself received here on ask.libreoffice a series of recommendations “do not use styles this or that sort”. Unfortunately one learns a series of lessons not until one falls in traps and latter ones happen quite frequently. Documentations (Writer Guide, Designing with LO, online Help not to mention) present only the beautiful word of Writer. Fair portion of insider knowledge but a knowledge critical for being productive on Writer usage is hardly to be found in Writer documentation. The least use I had on Help which puts its focus just on procedures. Concepts implemented are documented only in Writer Guide, as well as in Designing with LO. Anyhow both do not include insider knowledge I mean here.