Run scripts in print templates - Fluid Topics - Latest

Fluid Topics Configuration and Administration Guide

Category
Reference Guides
Audience
public
Version
Latest

It is possible to run JavaScript in print templates using <script> elements.

To do so, follow the steps below:

  1. Go to the Print templates menu.
  2. Select Download current template.
  3. Unzip the downloaded archive.
  4. Open the .vm file in a text editor.
  5. Add JavaScript in a <script> element.

    These scripts must include the window.FluidTopicsPdfCustomization function. See Script structure.

  6. Create an archive of the template and possible assets.

  7. Select Upload new template in the Print templates menu.
  8. Select Save.

It is not possible to run JavaScript in print templates specific to personal books. It it possible to run JavaScript when the same print template is used for both documents, and personal books.

To run scripts in print templates, it is necessary for an ADMIN user to deactivate the Print templates Security toggle.