Skip to content

Commit

Permalink
[docs] Update documentation for variables (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
savacano28 authored Oct 18, 2024
1 parent 24ad2f1 commit 28b3606
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 5 deletions.
Binary file removed docs/usage/assets/variables-management.png
Binary file not shown.
Binary file removed docs/usage/assets/variables-usage.png
Binary file not shown.
Binary file added docs/usage/assets/variables_creation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/usage/assets/variables_inject_definition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/usage/assets/variables_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/usage/assets/variables_management.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/usage/assets/variables_usage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/usage/assets/variables_usage_in_email.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 20 additions & 5 deletions docs/usage/components/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ Examples of built-in variables include but not limited to :
- **${user.email}**: Represents the email of the target user
- **${exercise.name}**: Represents the name of the current exercise
- **${player_uri}**: Represents the player interface platform link
- **${teams}**: Represents the list of team name/s for the injection


The list of **available variables** is found in the definition of the inject :

![Variables section](../assets/variables_inject_definition.png)
![Variables section](../assets/variables_list.png)

## Custom Variables

Expand All @@ -20,8 +27,10 @@ To define custom variables :
2. Navigate to the Definition tab
3. Navigate to the Variables section

In this section, users can create, update or delete custom variables.
![Variables section](../assets/variables-management.png)
In this section, users can create, update or delete custom variables :

![Variables section](../assets/variables_management.png)
![Variables section](../assets/variables_creation.png)

### Limitation

Expand All @@ -32,9 +41,15 @@ To create custom variables, consider the following limitation:

## Use Variables

These variables can be used to enhance personalization of certain stimuli within an exercise.
Here is a non-exhaustive list of concerned stimuli :
These variables can be used to enhance personalization of certain injects within an exercise.
Here is a non-exhaustive list of concerned injects :
- Email sending
- Sms sending

![Variables usage](../assets/variables-usage.png)
![Variables usage](../assets/variables_usage.png)
![Variables usage](../assets/variables_usage_in_email.png)

In case of a list like `articles`, which is a list of articles with properties such as `id`, `name`, and `uri`, or `${teams}`, you could write:

<#list articles as article> - `${article.name}` </#list>
<#list teams as team> `${team}` </#list>

0 comments on commit 28b3606

Please sign in to comment.