Tag: Difference between revisions

From Tygron Preview Support Wiki
Jump to navigation Jump to search
mNo edit summary
 
(4 intermediate revisions by one other user not shown)
Line 10: Line 10:
|-
|-
| $TOKEN
| $TOKEN
| Inserts the [[Web Token]] of the Project's [[Session]]
| Inserts the [[Web Token]] of the [[Project]]'s [[Session]].
|-
| $SESSION
| Inserts the url web endpoint of the [[Project]]'s [[Session]].
|}
|}


Line 28: Line 31:
|-
|-
| $NAME
| $NAME
| Inserts the name of the [[Panel]].
| Inserts the name of the [[Item]] the [[Panel]] is related to.<br>
If not used with a [[Template Panel]], an empty string is inserted.
|-
|-
| $ID
| $ID
| Inserts the [[ID]] of the [[Panel]].
| Inserts the [[ID]] of the [[Panel]].<br>
If not used with a [[Template Panel]], "-1" is inserted.
|-
|-
| $STAKEHOLDER_ID
| $STAKEHOLDER_ID
Line 46: Line 51:
|-
|-
| $ATTRIBUTE_ATTRIBUTENAME, where ATTRIBUTENAME is the [[TQL name|name]] of the [[Attribute]].
| $ATTRIBUTE_ATTRIBUTENAME, where ATTRIBUTENAME is the [[TQL name|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. "[]".
| Inserts the value of the indicated [[Attribute]] of the [[Item]] the [[Panel]] is related to.<br>
If the [[Attribute]] does not exist for the [[Item]], an empty array is inserted, i.e. "[]".
If not used with a [[Template Panel]], the tag is not replaced.
|-
|-
| $GLOBAL_GLOBALNAME, where GLOBALNAME is the [[TQL name|name]] of the [[Global]].
| $GLOBAL_GLOBALNAME, where GLOBALNAME is the [[TQL name|name]] of the [[Global]].
Line 56: Line 63:
* Tags can also be used in the output of [[Panel]]s based on an [[Excel]], and in [[Indicator]]s.
* Tags can also be used in the output of [[Panel]]s based on an [[Excel]], and in [[Indicator]]s.
* Text in the output which starts with a dollar-sign (like a tag) but is not explicitly a tag to the {{software}}, is not replaced or overwritten.
* Text in the output which starts with a dollar-sign (like a tag) but is not explicitly a tag to the {{software}}, 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.
* [[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.
* 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.

Latest revision as of 10:35, 27 October 2020

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.
$SESSION Inserts the url web endpoint 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 Item the Panel is related to.

If not used with a Template Panel, an empty string is inserted.

$ID Inserts the ID of the Panel.

If not used with a Template Panel, "-1" is inserted.

$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 Attribute does not exist for the Item, an empty array is inserted, i.e. "[]". If not used with a Template Panel, the tag is not replaced.

$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.
  • 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.

See also