Tag

From Tygron Support wiki
Jump to navigation Jump to search

Text in Panels can contain special tags that are replaced by the Tygron Platform based on the Project's data, the Session's data, and the context of the Panel, such as the owner or related Items of the Panel. A tag can be placed anywhere in the text of a Panel, and when the content of that Panel is rendered for display to the user, the tag is replaced by the appropriate data. In other words, the tag specifies a specific kind of data, and that data is inserted into the Panel's text in the location of the tag.

General tags

Tag Effect
$PROJECT_NAME Inserts the name of the Project.
$TOKEN Inserts the Web Token of the Project's Session

Web tags

Tag Effect
$LIB_CUSTOM Inserts the name of the custom javascript library, part of the web interface configuration.

Contextual tags

Tag Effect
$NAME Inserts the name of the Panel.
$ID Inserts the ID of the Panel.
$STAKEHOLDER_ID Inserts the ID of the user's Stakeholder.
$STAKEHOLDER Inserts the name of the user's Stakeholder.

Attributes tags

Tag Effect
$ATTRIBUTE_ATTRIBUTENAME, where ATTRIBUTENAME is the name of the Attribute. Inserts the value of the indicated Attribute of the Item the Panel is related to. If the value does not exist, an empty array is inserted, i.e. "[]".
$GLOBAL_GLOBALNAME, where GLOBALNAME is the name of the Global. Inserts the value of the indicated Globals. If the Global does not exist, it is considered "0".

Notes

  • Tags can also be used in the output of Panels based on an Excel, and in Indicators.
  • Text in the output which starts with a dollar-sign (like a tag) but is not explicitly a tag to the Tygron Platform, is not replaced or overwritten.
  • If the tag is not used on a Template Panel, and thus no Item is related to it, the $ATTRIBUTE tag is not replaced or overwritten.
  • Attribute and Global values are inserted with at least one decimal. I.e. "2" and "2.203" are displayed as "2.0" and "2.203" respectively.
  • If an Attribute is inserted which does not have exactly one value (i.e. does not exist, or is an Attribute array with multiple values), an array of values is inserted compatible with a javascript array definition.

seealso=