Create detail page field in the content types
As a user I want to be able to add a detail page to a content type.
Expected Behavior
User should be able to search/autocomplete a page for the detail page field in the content types.
Current Behavior
Detail field in content types does nothing.
Possible Solution
- We should use autocomplete
- We should create a component that wraps the autocomplete and implements the CVA (control value accessor) so we can show the page url in the field but the value is the id.
Steps to Reproduce (for bugs)
- Login
- Edit or create a content type
- Try to add a page id to the detail page
Acceptance Criteria
- User should be able to select a page by searching for it in the content type
- We should be able to do:
//host.com/folder-1/folder-2
- We should be able to do:
- Work in all the supported browsers (don't forget IE11 and iPad)
- Multilanguage
- Unit test
In addition I propose to display the full path to the detail page. Two sites may share the content type and as a result the detail page location as well. For example: /blogs/blog-detail
Showing this location helps us know immediately where to put the detail page of the new site.
Endpoint: POST TO: http://localhost:8080/api/es/search with the body
{
"query": {
"query_string": {
"query": "+basetype:5 +parentpath:*value*"
}
}
}
In order to escape slash we need to do
{
"query": {
"query_string": {
"query": "+basetype:5 +parentpath:*about-us\\/location*"
}
}
}
query example to search on hosts:
{
"query": {
"query_string": {
"query": "+basetype:5 +conhost:48190c8c-42c4-46af-8d1a-0cd5db894797 +parentpath:*about*"
}
}
}
Fixed, now this works as expected, we have some endpoint enhancements here #14778