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 All,
I would like to implement a search functionality not the entire site search but the search contents based on the node id .
for example the below is search code
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{ var searchQuery = Request.QueryString["query"]; if (!string.IsNullOrEmpty(searchQuery)) { <div class="searchresults"> <p class="intro-para">Your search results for <strong>"@searchQuery"</strong></p> <ul> @foreach (var result in Umbraco.Search(searchQuery)) { if([email protected]){ <li> <a class="heading1 inline-link" href="@result.Url">@result.Name</a> <div class="heading2">Created Date : @result.CreateDate.ToLongDateString()</div> <div class="heading2">Updated Date : @result.updateDate.ToLongDateString()</div> </li> } } </ul> </div> } }
from the above Umbraco.Search(searchQuery) this will search the entire website inside content.
Umbraco.Search(searchQuery)
is there any way i can search like this belwo
Umbraco.Search(searchQuery , "Nodeid")
for example
Umbraco.Search("home loans", "1011")
like this ?
Hi,
I think you want to look at Examine.
There are umpteen tutorials out there but it will quickly let you do what you want:
https://our.umbraco.com/documentation/reference/searching/Examine/quick-start/#search-children-of-a-specific-node
It's not as simple as Umbraco.Search but, as usual, Paul Seal has done a nice intro for you here: https://www.youtube.com/watch?v=B9NeqMN9jIw
Hi Steve,
I would like to get it achieve by using Umbraco.Search("home loans", "1011")
Like this :(
Or similar like this with the same
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Search content based on Parent node id or the current id of the page
Hi All,
I would like to implement a search functionality not the entire site search but the search contents based on the node id .
for example the below is search code
from the above
Umbraco.Search(searchQuery)
this will search the entire website inside content.is there any way i can search like this belwo
for example
like this ?
Hi,
I think you want to look at Examine.
There are umpteen tutorials out there but it will quickly let you do what you want:
https://our.umbraco.com/documentation/reference/searching/Examine/quick-start/#search-children-of-a-specific-node
It's not as simple as Umbraco.Search but, as usual, Paul Seal has done a nice intro for you here: https://www.youtube.com/watch?v=B9NeqMN9jIw
Hi Steve,
I would like to get it achieve by using
Umbraco.Search("home loans", "1011")
Like this :(
Or similar like this with the same
is working on a reply...