I see to aspects to your question:
- design a hierarchical tree of templates
- changing template for a document
#Template hierarchy
This is presently not possible because a LO document stores only one template. Additionally (IMHO), implementing a recursive inclusion to resolve the hierarchy relation(s) would be a nightmare for little benefit in the majority of cases.
Since end-users are not supposed to see the “subtleties” of template design (their dependencies), you may accept a somewhat tedious maintenance procedure with two levels.
-
At the fundamental level, you only manage your primary template and the various secondary (dependent) templates (business letter, internal note, technical document, …). Here the secondary templates are only seen as ordinary documents. Put everything in a separate private directory.
-
To hide the primary template from users, don’t record it with File
>Templates
>Manage Templates
. Save it as an *.ott. in this directory (don’t use File
>Templates
>Save as Template
which would otherwise save it in the public directory).
-
Double-click on the primary template icon to create your secondary templates. Note that with this method, the documents don’t keep their relation with the template.
-
To circumvent this hindrance, assign the primary template to the documents with DocumentTemplateChanger extension. Remember to save your secondary “templates” as ordinary .odt documents.
Now your secondary “template” documents can be automatically updated whenever your open them after a change in the primary template.
-
The second level deals with user-visible templates.
Open your secondary “templates” documents and File
>Templates
>Save as Templates
.
CAUTION! From my experience, it is better to delete first an existing template before replacing it, otherwise you’ll end up with duplicate entries in the management window. This may be a bug, but deleting before replacing avoids the trouble. You can also ignore the various warnings about already existing categories (again this may be a bug but I didn’t search the bugs site about it).
Your users will see only the secondary templates. The update process is separate from main line and is under your responsibility.
#Assigning a template to a document
-
To assign a template to an existing document or change the already assigned one, use the DocumentTemplateChanger extension.
EDIT 2020-02-25 More information about the extension in my answer for this question.
-
To create a templated document from scratch, File
>New
>Templates
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.