ContentSelector in content type

Enonic version: 6.4.0
OS: Ubuntu 15.10


I have a content selector which allows two different types, lets say A and B.

The issue is that there is a page of content type A named “Hest” and another page with same name of content type B.

Any suggestion on how we can distinguish the names ?

We do not want to change the object name. :grin:

Each content type (A and B) can have different icons so you can tell them apart that way. The screenshot you provided shows different icons in the list of results. The results also show the path of the content.

If you want to allow only certain types of content then you can use <allowType> in the content selector config. Use <allowPath> to prevent unwanted content from appearing in the result list.

thx for your help. In my case I want to allow the two content-type.

I think this is impossible to accomplish for now. I was looking for something like if there are two content-type with the same name in the query, like in the picture, the search would get their secondary names instead.

Something like that…

Name: Hest
Secondary Name: Hest - analysis

Name: Hest
Secondary Name: Hest - test

I typed “Hest” and I got two result with the same name. If this happen it would be nice if the query could get the objects secondary name instead. :sweat_smile:

Every content has a displayName and a “name” which is the path name for the content. I think the secondary name you mention is the last part of the content’s path. The results show the content type icon, the displayName, and the full path. The secondary name should appear at the end of the path. We can’t ignore the displayName in search results because that’s what most people are looking for most of the time. The content type icon and path are included in search results to help distinguish multiple contents with the same displayName. You could add another “Name” field to your content and use that for the website and then the displayNames could be changed to help your search.

1 Like