OpenWGA 7.7 - TMLScript reference

Design
Method :

scriptURL(codeType)

On object Design
Usage Generates a URL serving the code of a publishable script module resource, adressed by the base reference of this design object
Description OpenWGA publishes TMLScript module code for script types "css" and "js" (JavaScript), as these script types are used on the client side.

This is the TMLScript pendant of WebTML tag <tml:url type="css | js">.

Parameters

codeType (String):

The code type of the script module, either "css" or "js"

Return value The generated URL (String)
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
Examples

Generating the URL to script module "/scripts/css/basic.css" from the current apps design:

WGA.design().resolve("basic").scriptURL("css")