Refer to Images Using HTML tags

Images can be referenced using the HTML tag <img> in a label control. The images being referred to can be:

  • located on a website, or
  • stored in a policy model project as a custom file. To do this you use the ${resources-root} substitution in the HTML which will be automatically expanded in the interview to the current root path to the resources directory.

Note: Where possible, images should be added directly to screens rather than referred to using HTML with custom files.

You can also use text substitution in the URL for the image in the HTML tag. This enables a different image to be shown depending on the value of the substituted attribute. Note that because of the dynamic nature of the control, no image will be shown in the screen layout view in Policy Modeling.

To refer to an image using HTML:

  1. On the Interview tab in Policy Modeling, open the screen where you want to include the image.
  2. Add a Label Control.
  3. Select the control in the screen layout view.
  4. Click the text once and change it to include the necessary HTML tags. Note that to refer to an image in the project:
    • use the ${resources-root} substitution in the HTML which will be automatically expanded in the interview to the current root path to the resources directory.
    • add your image to the /interview-theme/resources/images folder in the project directory. (This folder is created when you click the Custom Files button in the Styles dialog box on the Interview tab.)
  5. Press Enter. The screen layout view is updated to show the image as it will appear in an interview.