Skip to content

Commit c2c4f88

Browse files
committed
feat: add README and example images for Extended Profile Fields slot
1 parent d06e3c1 commit c2c4f88

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Extended Profile Fields
2+
3+
### Slot ID: `org.openedx.frontend.profile.extended_profile_fields.v1`
4+
5+
### Slot ID Aliases
6+
* `extended_profile_fields_slot`
7+
8+
## Description
9+
10+
This slot is used to replace/modify/hide the extended profile fields in the account page.
11+
12+
## Example
13+
14+
> [!NOTE]
15+
> Take into account that the fields shown in the screenshots come from a [custom NPM Package](https://www.npmjs.com/package/@edunext/frontend-component-extended-fields)
16+
17+
The following `env.config.jsx` will replace the default custom fields.
18+
19+
![Screenshot of Default Fields](./images/default_fields.png)
20+
21+
with a custom extended fields component
22+
23+
![Screenshot of Custom Fields](./images/custom_fields.png)
24+
25+
```jsx
26+
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
27+
28+
import { ExtendedProfileFields } from '@organization/frontend-component-extended-fields';
29+
30+
const config = {
31+
pluginSlots: {
32+
extended_profile_fields_slot: {
33+
keepDefault: false,
34+
plugins: [
35+
{
36+
// Insert a custom ExtendedProfileFields component
37+
op: PLUGIN_OPERATIONS.Insert,
38+
widget: {
39+
id: 'extended_profile_fields',
40+
type: DIRECT_PLUGIN,
41+
RenderWidget: ExtendedProfileFields,
42+
},
43+
},
44+
],
45+
},
46+
},
47+
};
48+
49+
export default config;
50+
```
378 KB
Loading
253 KB
Loading

0 commit comments

Comments
 (0)