You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+76-27Lines changed: 76 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,21 @@
1
1
# Basilicom Extended Path Formatter Bundle for Pimcore
2
2
3
3
## Usecase / Summary
4
-
If you want to display specific informations of a dataObject when it's listed in a relation-field, you can use this plugin to easily configure a display-pattern.
5
-
Without creating a new PathFormatter in your project to displaying the name, price and currency of a product-class you can just configure it like:
4
+
5
+
If you want to display specific informations of a dataObject when it's listed in a relation-field, you can use this
6
+
plugin to easily configure a display-pattern.
7
+
Without creating a new PathFormatter in your project to displaying the name, price and currency of a product-class you
Or you might want to define a specific pattern for a product in the relation-field of a specific class.
18
+
13
19
```
14
20
# app/config/config.yml
15
21
basilicom_path_formatter:
@@ -19,73 +25,116 @@ basilicom_path_formatter:
19
25
patternOverwrites:
20
26
Pimcore\Model\DataObject\Product: "#{id} {name}"
21
27
```
22
-
While the product will be formatted like ``Sneakers 19.99EUR`` in all relation-fields with the formatter, the ProductList-Class will show them in like ``#13 - Sneakers``
28
+
29
+
While the product will be formatted like ``Sneakers 19.99EUR`` in all relation-fields with the formatter, the
30
+
ProductList-Class will show them in like ``#13 - Sneakers``
23
31
24
32
25
33
----------
26
34
35
+
## Version information
36
+
37
+
| Bundle Version | PHP | Pimcore |
38
+
|----------------|------|---------|
39
+
| ^1.0 | ^7.3 | ^6.0 |
40
+
| ^2.0 | ^8.0 | ^10.0 |
41
+
| ^3.0 | ^8.1 | ^11.0 |
27
42
28
43
## Installation
29
-
Install the bundle using ``composer require basilicom/pimcore-path-formatter-bundle``
44
+
45
+
Install the bundle using ``composer require basilicom/pimcore-path-formatter-bundle``
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.
106
+
While the product will be formatted like ``Sneakers 19.99EUR`` in all relation-fields, the ProductList-Class will show
107
+
them like ``#13 - Sneakers`` or ``#13 - Sneakers (premium-only!)``, based on the product class.
108
+
109
+
### Formatting documents and assets
110
+
111
+
```yaml
112
+
basilicom_path_formatter:
113
+
pattern:
114
+
Pimcore\Model\Asset: "{id} {key}"
115
+
Pimcore\Model\Document: "{id} {key}"
116
+
117
+
Pimcore\Model\DataObject\Car::files:
118
+
patternOverwrites:
119
+
Pimcore\Model\Asset: "{key}"
120
+
Pimcore\Model\Document: "{key}"
121
+
```
84
122
85
123
## Additional features
86
124
125
+
### Toggle inherited values in DataObjects
126
+
127
+
Inherited values from DataObjects will be used by default. In order to avoid this, just disable the configuration:
128
+
129
+
```
130
+
basilicom_path_formatter:
131
+
enable_inheritance: true|false # default true
132
+
```
133
+
87
134
### Showing images
88
-
As soon as you reference a property in the pattern, which is a ``Pimcore\ModelAsset\Image``, it will be rendered as small preview in the relation-list.
135
+
136
+
As soon as you reference a property in the pattern, which is a ``Pimcore\ModelAsset\Image``, it will be rendered as
137
+
small preview in the relation-list.
89
138
This feature can be disabled by setting the value of ``enable_asset_preview`` to ``false``.
0 commit comments