Conditional Document Elements

From 3B Knowledge
Revision as of 03:35, 10 April 2025 by Admin (talk | contribs) (Created page with "==== 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 ==== # Create a new template document # Add any element/text # Edit the source of the document # Add a "render" attribute with a conditional statement Example: <code>return 1 == 1;</code>or <code>return contextObject =...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.