Tag: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
Text in panels can contain special tags that are replaced by the {{software}} based on the project data, session and the context (owner, maplink etc.) of the panel. This page shows the supported panel tags.
Text in [[Panel]]s can contain special tags that are replaced by the {{software}} based on the Project's data, the [[Session]]'s data, and the context of the [[Panel]], such as the [[Stakeholder|owner]] or related [[Item]]s 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===
===General tags===
* $PROJECT_NAME, name of the [[Project]].
{|class=wikitable
* $TOKEN, [[API token]] of your Project's [[Session]].
! Tag
! Effect
|-
| $PROJECT_NAME
| Inserts the name of the [[Project]].
|-
| $TOKEN
| Inserts the [[API token]] of the Project's [[Session]]
|}


===Web tags===
===Web tags===
* $LIB_CUSTOM, the name of the [[custom javascript library]], part of the [[web interface]] configuration.
{|class=wikitable
! Tag
! Effect
|-
| $LIB_CUSTOM
| Inserts the name of the [[custom javascript library]], part of the [[web interface]] configuration.
|}


===Contextual tags===
===Contextual tags===
* $NAME, name of the [[Panel]].
{|class=wikitable
* $ID, [[ID]] of the [[Panel]].
! Tag
* $STAKEHOLDER_ID, the [[ID]] of the [[stakeholder]] who owns the [[Panel]], if it has one. -1 if it has none.
! Effect
* $STAKEHOLDER, the name of the [[stakeholder]] who owns the [[Panel]], if it has one. Empty text if it has none.
|-
| $NAME
| Inserts the name of the [[Panel]].
|-
| $ID
| Inserts the [[ID]] of the [[Panel]].
|-
| $STAKEHOLDER_ID
| Inserts the [[ID]] of the [[stakeholder]] who owns the [[Panel]], if it has one. -1 if it has none.
|-
| $STAKEHOLDER
| Inserts the name of the [[stakeholder]] who owns the [[Panel]], if it has one. Empty text if it has none.
|}


===Attributes tags===
===Attributes tags===
* $ATTRIBUTE_ATTRIBUTENAME, where ATTRIBUTENAME is the [[TQL name|name]] of the [[Attribute]]. This allows users to acquire attributes stored in this panel, which can change based on calculations of indicators or other panels.
{|class=wikitable
* $GLOBAL_GLOBALNAME, where GLOBALNAME is the [[TQL name|name]] of the [[Global]]. This also allows users to acquire values of globals stored in your project, which can change based on calculation of indicators or other panels.
! Tag
! Effect
|-
| $ATTRIBUTE_ATTRIBUTENAME, where ATTRIBUTENAME is the [[TQL name|name]] of the [[Attribute]]
| Inserts the values of [[Attribute]]s stored in this [[Panel]], which can change based on calculations of [[Indicator]]s or other [[Panel]]s.
|-
| $GLOBAL_GLOBALNAME, where GLOBALNAME is the [[TQL name|name]] of the [[Global]]
| Inserts the values of [[Global]]s stored in the [[Project]], which can change based on calculation of [[Indicator]]s or other [[Panel]]s.
|}

Revision as of 07:31, 29 June 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 API 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 stakeholder who owns the Panel, if it has one. -1 if it has none.
$STAKEHOLDER Inserts the name of the stakeholder who owns the Panel, if it has one. Empty text if it has none.

Attributes tags

Tag Effect
$ATTRIBUTE_ATTRIBUTENAME, where ATTRIBUTENAME is the name of the Attribute Inserts the values of Attributes stored in this Panel, which can change based on calculations of Indicators or other Panels.
$GLOBAL_GLOBALNAME, where GLOBALNAME is the name of the Global Inserts the values of Globals stored in the Project, which can change based on calculation of Indicators or other Panels.