Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Christina Carter 12 posts 93 karma points
    Apr 15, 2016 @ 20:10
    Christina Carter
    0

    ezSearch searchField is a content picker

    Hello-

    I have an "Article" document type and a "Category" document type. In the Article, there is a property called Primary Category which is a content picker property editor that points to the Category document type.

    I need to include the Primary Category as one of the ezSearch SearchFields. However, because the property is a content picker, the value for that field in the Arenter image description hereticle is the Id and not the name. For example, a category I created called "Test Category" has an id of 1123. If i search for "1123" it will show all articles that have Test Category selected, but if I search for "Test Category" it returns no results.

    Is there any way to search the fields of the content referenced in the content picker? I know this won't work but something like "SearchFields = "primaryCategory.categoryName".

                @Umbraco.RenderMacro("ezSearch", new { SearchFields = "primaryCategory.categoryName" })
    

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft