Skip to main content
Version: 1.26 (Current)

Tokens menu

The main page of the Tokens section allows you to:

Core Tokens

The full list of available Core Tokens in Plant an App is displayed by clicking the Core Tokens button; this will expand the list.

core_tkn1.png

Alternatively, you can expand/collapse the list by clicking the "Expand All" / "Collapse All" buttons in the bottom part of the section.

core_tkn2.png

Selecting a specific Core Token from the list will provide details about it on the main part of the screen - namely, a short description, the values it accepts, its typical usage and a few examples (where relevant).

core_tkn4.png

For a general detailed list of the available Core Tokens in Plant an App, please see the "Core Tokens" page.

Note that clicking a specific token from the list will open a dedicated associated tab on the main screen. This will happen for every different namespace you select from the list. You can then easily navigate between the tabs and close them separately by clicking the "X" button.

core_tkn3.png

Namespaces and custom tokens

Other than core tokens, Plant an App allows you to create customized tokens and group them into specific, custom namespaces. We have a complete documentation section about this specific topic - please see the "Custom Tokens and Namespaces" page.

Export and import tokens

Allows you to export and import tokens as a JSON.

Export token

  1. Click the Export tokens button.
    tkn_exp1.png
  2. Check the box(es) next to the token(s) you want to export.
tkn_exp2.png
Note that you can select individual tokens from a namespace, or the namespace as a whole - in which case all the tokens in the given namespace will be exported. In the example above, a specific token from one namespace is selected for export (MyToken2), as well a namespace (Namespace2) in full. Notice the different type of selection icons. You also have the `Select All` and `Deselect All` buttons to help you with multiple, large selections.
  1. Click the Export button. You will be presented with your tokens selected for export as a JSON. You can then click the Copy button and subsequently paste the selection to a file or field.
tkn_exp3.png

Once finished, simply click the Cancel button or anywhere outside the export window to automatically close it.

Import token

  1. Click the Import tokens button.
tkn_imp1.png
  1. Paste the token(s)/namespace(s) you want to import, as a JSON, in the field that is presented and click Import.
tkn_imp2.png
  1. A message confirming the success of the import process should be displayed in the lower right corner of your window.
tkn_imp3.png

Note that the import field contains an automatic validator that will detect any syntax problems that would prevent the proper interpretation (and thus the import) of your token(s) or namespace(s). The line(s) where a syntax problem is detected are marked accordingly and a tooltip will give you a brief explanation of the issue. See an example below:

tkn_imp4.png

Settings (Security and Debugging)

In this section you can change settings related to the security aspects of your tokens, as well as activating debug features that allow detailed information logging. The Settings are accessible by clicking the "cog" button:

tkn_sett.png

Security

You can access the security settings of your tokens by expanding the "Security" section of the General Settings window. This will give you access to two toggle-based settings:

tkn_security.png
  • Toggle the "Allow inline script access" slider to the right to enable the creation of Razor tokens on the fly, directly inside the content (for example, in the content of HTML modules).

In order to be recognized as such, the inline scripts should be placed between tags:

<code data-language="razor">...</code>

Please see here for a few examples.

caution

Enable this option only if the users accessing the configuration screens where tokens can be used are trusted.

  • Toggle the "Allow [AppSettings:*] tokens" slider to the right to allow the access of the app settings from the IIS web.config file through [AppSettings:<key>] type tokens.
tkn_security2.png
caution

While activating this feature can be useful for easy access to global settings, be aware that application settings can contain sensitive information such as encryption keys.

Make sure that you only enable this option if the users accessing the configuration screens where tokens can be used are trusted.

note

You will need to click the Save button (lower right corner of the General Settings window) for the changes to take effect.

Debugging

You can expand the token debugging feature by clicking on the "Debugging" section of the General Settings window.

tkn_debug.png

Toggle the slider (1) to the right to activate the token debugging feature and to the left to deactivate it.

You can filter the debug option by adding specific IP addresses to the debugging list (2). In this case, debugging information will only be logged if access by a user whose IP address is in the list is detected. Insert only one IP address per line.

You can add your present IP address to the list above in one click by using the Append my current IP button (3).

note

You will need to click the Save button (lower right corner of the General Settings window) for the changes to take effect.

Test Tokens feature

Found in the lower part of the main page, this feature allows you to test your tokens and check their output on-the-spot. You can expand it either from the Edit token screen (via the "Save & Test" button), or by clicking the "<> Test Tokens" bar in the bottom of the main page.

tokens_test.png

For more details about this feature, please check the "Custom Tokens and Namespaces" page in this section.