Conditional Document Elements

From 3B Knowledge
Jump to navigation Jump to search

Features Added

  • You can add "render" attribute to any html element to evaluate whether or not that element needs to be displayed.
  • You can access the element itself and the context object inside of your evaluation

Testing and Validation

  1. Create a new template document
  2. Add any element/text
  3. Edit the source of the document
  4. Add a "render" attribute with a conditional statement Example: return 1 == 1;or return contextObject == 'Contact'
  5. The condition will be evaluated and if the result is 'true', the element will be hidden.