Skip to content

Commit 8fa4082

Browse files
Updated readme.md
1 parent e27957b commit 8fa4082

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ if (class_exists('\\Basilicom\\PathFormatterBundle\\BasilicomPathFormatterBundle
6161
6262
6363
## Advanced configuration
64+
### Contextual pattern overwrites
6465
It is possible to configure a context-based pattern, so that a dataObject in a relation-field of a specific class will be formatted differently.
6566
6667
**Example:**
67-
```
68+
```yaml
6869
# app/config/config.yml
6970
basilicom_path_formatter:
7071
pattern:
@@ -82,6 +83,19 @@ basilicom_path_formatter:
8283

8384
While the product will be formatted like ``Sneakers 19.99EUR`` in all relation-fields, the ProductList-Class will show them like ``#13 - Sneakers`` or ``#13 - Sneakers (premium-only!)``, based on the product class.
8485

86+
### Formatting documents and assets
87+
```yaml
88+
basilicom_path_formatter:
89+
pattern:
90+
Pimcore\Model\Asset: "{id} {key}"
91+
Pimcore\Model\Document: "{id} {key}"
92+
93+
Pimcore\Model\DataObject\Car::files:
94+
patternOverwrites:
95+
Pimcore\Model\Asset: "{key}"
96+
Pimcore\Model\Document: "{key}"
97+
```
98+
8599
## Additional features
86100
87101
### Showing images

0 commit comments

Comments
 (0)