Retrieve UI Settings
Last updated on
29 July 2023
For fully decoupled solution there is an endpoint to retrieve UI settings: `/api/search/<search_api_endpoint>/ui-settings`. Response is the same as drupalSettings object for the semi-decoupled block solution. For example there is Endpoint with id "default" that uses One column layout and such UI elements: Pager, Search Input, Search Summary, Facet and one of the plugins for search results display.
{
"id":"default",
"label":"Default",
"base_url":"http:\/\/ddd.ddev.site\/api\/search\/default",
"elements":{
"006148d3-2eb9-4bde-9175-5f78ca5a720c":{
"id":"006148d3-2eb9-4bde-9175-5f78ca5a720c",
"type":"pager",
"weight":0,
"widget":"mini"
},
"021b5989-314d-45bc-a6bd-bbf28b483d4e":{
"id":"021b5989-314d-45bc-a6bd-bbf28b483d4e",
"type":"search_input",
"weight":0,
"behaviors":{
"filter":0,
"url":0
},
"widget":"autocomplete",
"settings":{
"placeholder":"Search for contents",
"filter":{
"label":"Your search"
}
}
},
"4e92ce6d-8f5d-4d62-96cc-0b46bd715b62":{
"id":"4e92ce6d-8f5d-4d62-96cc-0b46bd715b62",
"type":"summary",
"weight":0
},
"afd64988-bc0d-4811-9a39-1fd575187482":{
"id":"afd64988-bc0d-4811-9a39-1fd575187482",
"type":"search_result_local",
"weight":0,
"settings":{
"field_title":"title",
"field_text":"preview_text",
"field_category":"category_name",
"field_image":"preview_image",
"no_results":"No results found.",
"loading":"Loading...",
"columns":"4"
}
},
"0b4f0ca2-3ed5-4ac2-a59f-3d52283cb2ec":{
"id":"0b4f0ca2-3ed5-4ac2-a59f-3d52283cb2ec",
"type":"facet",
"weight":1,
"behaviors":{
"collapsible":0,
"collapsed":0
},
"settings":{
"facet":"content_type",
"show_numbers":true,
"soft_limit":0,
"show_reset_link":true,
"reset_text":"Show all",
"hide_reset_when_no_selection":true,
"soft_limit_settings":{
"show_less_label":"Show less",
"show_more_label":"Show more"
},
"orientation":"vertical",
"use_hierarchy":false,
"expand_hierarchy":false,
"field_alias":"type",
"url_alias":"type",
"show_title":false
},
"label":"Content type",
"widget":"checkbox"
}
},
"layout":{
"id":"search_twocol",
"regions":{
"top":[
"021b5989-314d-45bc-a6bd-bbf28b483d4e"
],
"first":[
"4e92ce6d-8f5d-4d62-96cc-0b46bd715b62",
"0b4f0ca2-3ed5-4ac2-a59f-3d52283cb2ec"
],
"second":[
"afd64988-bc0d-4811-9a39-1fd575187482"
],
"bottom":[
"006148d3-2eb9-4bde-9175-5f78ca5a720c"
]
}
},
"base_url_autocomplete":"http:\/\/ddd.ddev.site\/search_api_autocomplete\/default"
}Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion