Skip to content

Commit 47d3bfd

Browse files
sakshamarora1kpsherva
authored andcommitted
feat(custom_fields): document landing_page_search_attr config
1 parent e5f6fdd commit 47d3bfd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/operate/customize/metadata/custom_fields/custom_fields.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,24 @@ Finally, we need to add the new field to the `RDM_CUSTOM_FIELDS` and `RDM_CUSTOM
173173
RDM_CUSTOM_FIELDS = [
174174
ExperimentsCF(name="experiments")
175175
]
176+
```
177+
178+
Each field can then be configured using the following properties:
176179

180+
- `field` - The name of the custom field.
181+
- `template` - The jinja template used to render a field in the landing page.
182+
- `ui_widget` - The React form component to be used for the field.
183+
- `props` - Parameters to be injected in the React component.
184+
- `landing_page_search_attr` - Optional field to specify which value inside the vocabulary should be used for search links on the landing page.
185+
186+
```python
177187
RDM_CUSTOM_FIELDS_UI = [{
178188
"section": "CERN Experiments",
179189
"fields": [{
180190
"field": "experiments",
181191
"ui_widget": "Experiments",
182192
"template": "experiments.html",
193+
"landing_page_search_attr": "id",
183194
"props": {
184195
"label": _("Experiments"),
185196
"title": {

0 commit comments

Comments
 (0)