|
|
# Labels
|
|
|
|
|
|
## Label placeholders
|
|
|
A placeholder has the format `%%PLACEHOLDER%%` and will be filled with the concrete data by Part-DB.
|
|
|
A placeholder has the format `[[PLACEHOLDER]]` and will be filled with the concrete data by Part-DB.
|
|
|
You can use the "Placeholders" dropdown in content editor, to automatically insert the placeholders.
|
|
|
|
|
|
### Common
|
|
|
|
|
|
| Placeholder | Description | Example |
|
|
|
|---|---|---|
|
|
|
| `%%USERNAME%%` | The user name of the currently logged in user | admin |
|
|
|
| `%%USERNAME_FULL%%` | The full name of the current user | John Doe (@admin) |
|
|
|
| `%%DATETIME%%` | The current date and time in the selected locale | 31.12.2017, 18:34:11 |
|
|
|
| `%%DATE%%` | The current date in the selected locale | 31.12.2017 |
|
|
|
| `%%TIME%%` | The current time in the selected locale | 18:34:11 |
|
|
|
| `%%INSTALL_NAME%%` | The name of the current installation (see $config['partdb_title']) | Part-DB |
|
|
|
| `[[USERNAME]]` | The user name of the currently logged in user | admin |
|
|
|
| `[[USERNAME_FULL]]` | The full name of the current user | John Doe (@admin) |
|
|
|
| `[[DATETIME]]` | The current date and time in the selected locale | 31.12.2017, 18:34:11 |
|
|
|
| `[[DATE]]` | The current date in the selected locale | 31.12.2017 |
|
|
|
| `[[TIME]]` | The current time in the selected locale | 18:34:11 |
|
|
|
| `[[INSTALL_NAME]]` | The name of the current installation (see $config['partdb_title']) | Part-DB |
|
|
|
|
|
|
### Parts
|
|
|
|
|
|
| Placeholder | Description | Example |
|
|
|
|---|---|---|
|
|
|
| `%%ID%%` | The internal ID of the part | 24 |
|
|
|
| `%%NAME%%` | The name of the part | ATMega328 |
|
|
|
| `%%CATEGORY%%` | The name of the category (without path) | AVRs |
|
|
|
| `%%CATEGORY_FULL%%` | The full path of the category | Aktiv->MCUs->AVRs |
|
|
|
| `%%MANUFACTURER%%` | The name of the manufacturer | Atmel |
|
|
|
| `%%MANUFACTURER_FULL%%` | The full path of the manufacturer | Halbleiterhersteller->Atmel |
|
|
|
| `%%FOOTPRINT%%` | The name of the footprint (without path) | DIP-32 |
|
|
|
| `%%FOOTPRINT_FULL%%` | The full path of the footprint | Bedrahtet->DIP->DIP-32 |
|
|
|
| `%%MASS%%` | The mass of the part | 123.4 g |
|
|
|
| `%%MPN%%` | The manufacturer product number | BC547ACT |
|
|
|
| `%%TAGS%%` | The tags of the part | SMD, Tag1 |
|
|
|
| `%%M_STATUS%%` | The manufacturing status of the part | Active |
|
|
|
| `%%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 | |
|
|
|
| `[[ID]]` | The internal ID of the part | 24 |
|
|
|
| `[[NAME]]` | The name of the part | ATMega328 |
|
|
|
| `[[CATEGORY]]` | The name of the category (without path) | AVRs |
|
|
|
| `[[CATEGORY_FULL]]` | The full path of the category | Aktiv->MCUs->AVRs |
|
|
|
| `[[MANUFACTURER]]` | The name of the manufacturer | Atmel |
|
|
|
| `[[MANUFACTURER_FULL]]` | The full path of the manufacturer | Halbleiterhersteller->Atmel |
|
|
|
| `[[FOOTPRINT]]` | The name of the footprint (without path) | DIP-32 |
|
|
|
| `[[FOOTPRINT_FULL]]` | The full path of the footprint | Bedrahtet->DIP->DIP-32 |
|
|
|
| `[[MASS]]` | The mass of the part | 123.4 g |
|
|
|
| `[[MPN]]` | The manufacturer product number | BC547ACT |
|
|
|
| `[[TAGS]]` | The tags of the part | SMD, Tag1 |
|
|
|
| `[[M_STATUS]]` | The manufacturing status of the part | Active |
|
|
|
| `[[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 | |
|
|
|
|
|
|
## 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/).
|
... | ... | |