Content Blocks (Paragraphs)



EDocGen supports the dynamic population of content blocks into your templates. This is useful if you want to


  1. Have compliance or company-related information in one place and want to dynamically populate them into templates. Whenever there is a change in this information, it automatically reflects in all related templates, without any modifications to the template.
  2. Dynamically display product information, sections/sub-sections based on conditions. Conditional paragraphs are useful for the generation of reports and region-specific contracts with a single master template .
  3. Populate RTF/DOCX documents stored in the database as a blob.


You can store your content blocks either within the system or outside.  

  1. Upload them into the system and populate them at run time.
  2. Populate content blocks, accessible through URL.
  3. Store them in the database and retrieve them as BLOB through database queries for the population.


Step1: Upload Content Blocks

This is an optional step. If you're going to populate through URL or database, skip this and head to Step2.

Under the template left nav, there are two sub-tabs for paragraphs & images. Click on the paragraph. You can Upload new content blocks by clicking the "Create a new paragraph" button.

 



Step2: Add relevant tags to the template

In your template, add {>paragraphtag} at the place where you want the paragraph(s) to be embedded. The marker for the content block is {>tagname}. This helps EDocGen to identify a content block. It has to be a single word.


Ex: {>company_info}

      {>commoncontent}



Step3: Populate content blocks

Populate content blocks (paragraphs) into your DOCX, PPTX, and PDF templates through any of the methods listed above.


 


While populating XML/Excel/JSON data, include paragraph ids in the respective data field. Click on the "Copy ID" button to get the paragraph id of a content block. This is an alphanumeric and below is an example id.

61026e1aaac1b53df8d01925


If your content blocks are accessible through URLs, you can populate them without uploading them into the system. In this case, instead of paragraph id, include the URL of the content block for the data field.


 


Another USP of the system is the BLOB population. You can have the entire BLOB in the XML file or retrieve it from the database through a query, during document generation.

If you are using the webform option (interactive) to populate the template, you would see drop-downs of content blocks in the web form. Select from the drop-down to populate them into the template at run time.



For conditional population of content blocks, place the paragraph tag inside the conditional statement.