core icon indicating copy to clipboard operation
core copied to clipboard

Create detail page field in the content types

Open fmontes opened this issue 8 years ago • 5 comments

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

  1. We should use autocomplete
  2. 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)

  1. Login
  2. Edit or create a content type
  3. Try to add a page id to the detail page

Acceptance Criteria

  1. 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
  2. Work in all the supported browsers (don't forget IE11 and iPad)
  3. Multilanguage
  4. Unit test

fmontes avatar May 29 '18 17:05 fmontes

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.

gblankendal avatar Jun 05 '18 08:06 gblankendal

Endpoint: POST TO: http://localhost:8080/api/es/search with the body

{
    "query": {
        "query_string": {
            "query": "+basetype:5 +parentpath:*value*"
        }
    }
}

fmontes avatar Jun 15 '18 14:06 fmontes

In order to escape slash we need to do

{
    "query": {
        "query_string": {
            "query": "+basetype:5 +parentpath:*about-us\\/location*"
        }
    }
}

fmontes avatar Jun 19 '18 19:06 fmontes

query example to search on hosts:

{
    "query": {
        "query_string": {
            "query": "+basetype:5 +conhost:48190c8c-42c4-46af-8d1a-0cd5db894797 +parentpath:*about*"
        }
    }
}

alfredo-dotcms avatar Jun 21 '18 17:06 alfredo-dotcms

Fixed, now this works as expected, we have some endpoint enhancements here #14778

bryanboza avatar Jul 03 '18 19:07 bryanboza