... | ... | @@ -33,4 +33,16 @@ A placeholder has the format `%%PLACEHOLDER%%` and will be filled with the concr |
|
|
| `%%DESCRIPTION%%` | The rich text description of the part | *NPN* |
|
|
|
| `%%DESCRIPTION_T%%` | The description as plain text | NPN |
|
|
|
| `%%COMMENT%%` | The rich text comment of the part | |
|
|
|
| `%%COMMENT_T%%` | The comment as plain text | | |
|
|
\ No newline at end of file |
|
|
| `%%COMMENT_T%%` | The comment as plain text | |
|
|
|
|
|
|
## Twig mode
|
|
|
If you select "Twig" in parser mode under advanced settings, you can input a twig template in the lines field (activate source mode). You can use most of the twig tags and filters listed in [offical documentation](https://twig.symfony.com/doc/3.x/).
|
|
|
|
|
|
The following variables are in injected into Twig and can be accessed using `{{ variable }}` (or `{{ variable.property }}`):
|
|
|
|
|
|
| Variable name | Description |
|
|
|
| ------------- | ----------- |
|
|
|
| `{{ element }}` | The target element, selected in label dialog |
|
|
|
| `{{ user }}` | The current logged in user. Null if you are not logged in |
|
|
|
| `{{ install_title }}` | The name of the current Part-DB instance (similar to [[INSTALL_NAME]] placeholder). |
|
|
|
| `{{ page }}` | The page number (the nth-element for which the label is generated | |
|
|
\ No newline at end of file |