Skip to content

How to create a document template from scratch

Marina Popleteeva edited this page Dec 6, 2024 · 4 revisions

Original working document https://docs.google.com/document/d/1WSJ1Y2Ow12QjisocdN1O7fqZYoYwtUwIBer_wKpm6wM/edit?tab=t.0 Delete when info will be transferred to this page.

Abbreviations: KM - Knowledge model DM - document template

Introduction

This is a guide on how to create a Document Template for a simple KM from scratch. Such simple KM and corresponding template contains only Value-text questions with guidelines. It is just a DSW version of a funder template (e.g. FNR or MRC). Steps to create more advanced structures such as tables and aesthetics is not part of this guide.

Additional material

Watch the video tutorial (you can skip “Installation of DSW TDK and Connection to DSW API” and start from 19:00).

Step-by-step guide:

  1. Create a new DT editor following this guide.

    1. Leave the field “Based on” empty.
  2. Go to the “Settings” tab on the freshly created DT and

    1. fill all General settings;
    2. fill out the Knowledge Model(s), you wish the created doc template to be compatible with.
      1. leave the field “Max version” empty
    3. go to the “Formats” tab and add the formats you wish for the doc template.
      1. you can copy them from another DT, like Horizon Europe DMP template.
  3. Navigate to the “Files” tab and create the following:

    1. subfolder src
    2. inside scr create files index.html.j2; style.css; uuids.j2. At the end you will have something like this: TODO:image
  4. Put a skeleton into index.html.j2 (see an example below):

  5. Using KM inside (see another guide) populate uuids.j2 file. TODO: change the link to another wiki page. This step is not needed if you are going to use a generic template at step 6.

  6. Setup Preview. You should see the word “Test”.

  7. Use the index file to create the content of the doc template. You can use the following video to guide you.

    • If your model is simple (a simple list of questions), you might want to check “Creating generic template” part of the video.
    • If your answers are a big block of text, they might have several paragraphs. The following code to split them might be useful:
  8. Optional: In the style.css file, you can format the layout of your doc template with CSS. An example is shown below:

Clone this wiki locally