OpenWGA 7.8 - TMLScript reference

TMLContext "this"
Method :

content()

On object TMLContext "this"
Usage Providfes the WGAPI object "WGContent" which represents the current content document in context
Return value The current content document in context (WGAPI object WGContent)
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
Examples This example add a file attachment to the content document currently in context. It uses the WGAPI object WGContent as a parameter for WebTML form method attach():

<tml:action id="save">
    tmlform.attach(content());
</tml:action>

<tml:form id="TestForm">
   File Upload<br>
   <tml:input type="file" name="FileUpload"> size="80"</tml:input>
   <a href="<tml:url type="action" action="save"/>">Attach file to document</a>
</tml:form>