Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi! I need to add the ability to search for content by the "Title" field among the 3 types (category, property, organization).
My controller:
public class SearchController : SurfaceController { private readonly UmbracoHelper _uh = new UmbracoHelper(UmbracoContext.Current); [HttpPost] public ActionResult Find(string text) { var query = ExamineManager.Instance.CreateSearchCriteria() .NodeName("category").Or() .NodeName("property").Or() .NodeName("organization") .And().Field("title", text) .Compile(); var result = _uh.Search(query); return PartialView("~/Views/Partials/FindResult.cshtml", result); } }
The structure of my site:
-Categories
-----Category (has Title)
-Properties
-----Property (has Title)
-Organizations
-----Organization (has Title)
But it seems it does not work properly. Please any help
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
search content
Hi! I need to add the ability to search for content by the "Title" field among the 3 types (category, property, organization).
My controller:
The structure of my site:
-Categories
-----Category (has Title)
-Properties
-----Property (has Title)
-Organizations
-----Organization (has Title)
But it seems it does not work properly. Please any help
is working on a reply...