Part-DB support the generation and printing of labels for parts, part lots and storelocation.
You can use the "Tools -> Labelgenerator" menu entry to create labels, or click the label generation link on the part.
You can define label templates by creating Label profiles. This way you can create many similar looking labels with for
many parts.
The content of the labels is defined by the templates content field. You can use the WYSIWYG editor to create and style the content (or write HTML code).
Using the "Label placeholder" menu in the editor, you can insert placeholders for the data of the parts.
It will be replaced by the concrete data when the label is generated.
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 |