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: content/extensions/ui-extensions.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -309,6 +309,31 @@ Example :
309
309
```
310
310
After receiving this *event*, the PIM will send a PostMessage *event*, similar to the one sent after the iframe loading.
311
311
312
+
**Product and product model context change**
313
+
314
+
Using postmessage, the PIM context is propagated within the iframe when it changes. This only applies to the product and product model positions: pim.product-model.header and pim.product.header.
315
+
316
+
The message contains :
317
+
- A `context` object containing the configured `locale` and `channel`.
318
+
- A `user` object containing the `uuid`, `username` and `groups` of the connected user.
319
+
320
+
Example :
321
+
```json
322
+
{
323
+
"context": {
324
+
"locale": "en_US",
325
+
"channel": "ecommerce"
326
+
},
327
+
"user": {
328
+
"username": "admin",
329
+
"groups": [
330
+
"IT support",
331
+
"All"
332
+
]
333
+
}
334
+
}
335
+
```
336
+
312
337
#### Ensuring security of embedded iframes
313
338
314
339
To help ensuring the security of iframes we recommand using these two solutions:
0 commit comments