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
Hello,
I am using Examine Search to list products, and what i used to list products under a specific parent is the below code :
var results = searcher.CreateQuery("content").ParentId(1105).Execute();
where the 1105 is the products folder node ID and this works when the structure is like this :
-- Products Folder ----- Product1 ----- Product2
This wouldn't return the products when if I add a new level such as Year like below:
-- Products Folder ----- 2019 ------------ Product1 ------------ Product2 ------------ Product3
Note I don't want to put the 2019 node ID in the Examine Query as a ParentID
Hello
Anyone has a solution for the issue above please?
Thanks
Hey @Mus'ab,
You could do something like this: var results = Umbraco.Web.Composing.Current.UmbracoHelper.Content(1105).Descendants<{{Product Document Type}}>().ToList();
var results = Umbraco.Web.Composing.Current.UmbracoHelper.Content(1105).Descendants<{{Product Document Type}}>().ToList();
Kind regards,
Joep
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco 8 Examine Search
Hello,
I am using Examine Search to list products, and what i used to list products under a specific parent is the below code :
where the 1105 is the products folder node ID
and this works when the structure is like this :
-- Products Folder
----- Product1
----- Product2
This wouldn't return the products when if I add a new level such as Year like below:
-- Products Folder
----- 2019
------------ Product1
------------ Product2
------------ Product3
Note I don't want to put the 2019 node ID in the Examine Query as a ParentID
Hello
Anyone has a solution for the issue above please?
Thanks
Hey @Mus'ab,
You could do something like this:
var results = Umbraco.Web.Composing.Current.UmbracoHelper.Content(1105).Descendants<{{Product Document Type}}>().ToList();
Kind regards,
Joep
is working on a reply...