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
Does the NestedContent already have a method or helper to add the values to the examine index correctly (without json stuff)?
Thanks for your feedback.
Lele,
As far as I am aware it does not you would have to using Examine gatheringnode data event and inject in yourself without json.
Regards
Ismail
Hi Lele,
As Ismail says, there's nothing built-in and you would have to hook into Examine's GatheringNodeData event.
GatheringNodeData
For a code example, here is Matt Brailsford's snippet...
https://gist.github.com/mattbrailsford/7eb24abe61a4c896b3e5
Hope this helps.
Cheers, - Lee
oops, just noticed that snippet has an extension method, DetectIsJson().
DetectIsJson()
You can find that here...
https://gist.github.com/mattbrailsford/851d210b1c3edcd3b7f9
Hi Lele, Ismael,
I got this working in combination with the models builder.
var content = string.Empty; var myNestedProperty = MyContentModel.GetModelPropertyType(x => x.NestedContentProperty); var key = myNestedProperty .PropertyTypeAlias; if (args.Fields.ContainsKey(key)) { var items = myNestedProperty.ConvertDataToSource(args.Fields[key], false) as List<IPublishedContent>; if (items != null) { foreach (var item in items) { content += " " + item.GetProperty("title").DataValue; content += " " + item.GetProperty("description").DataValue; } } } return content;
Maybe this post can help you out as well : http://24days.in/umbraco/2014/working-with-complex-archetype-datatypes/
It's about updating archetype with the ContentService. But there maybe some usefull code as well.
Dave
Hi guys
Awesome thanks! Nice examples!
h5yr all
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Add to Examine index
Does the NestedContent already have a method or helper to add the values to the examine index correctly (without json stuff)?
Thanks for your feedback.
Lele,
As far as I am aware it does not you would have to using Examine gatheringnode data event and inject in yourself without json.
Regards
Ismail
Hi Lele,
As Ismail says, there's nothing built-in and you would have to hook into Examine's
GatheringNodeData
event.For a code example, here is Matt Brailsford's snippet...
https://gist.github.com/mattbrailsford/7eb24abe61a4c896b3e5
Hope this helps.
Cheers,
- Lee
oops, just noticed that snippet has an extension method,
DetectIsJson()
.You can find that here...
https://gist.github.com/mattbrailsford/851d210b1c3edcd3b7f9
Cheers,
- Lee
Hi Lele, Ismael,
I got this working in combination with the models builder.
Maybe this post can help you out as well : http://24days.in/umbraco/2014/working-with-complex-archetype-datatypes/
It's about updating archetype with the ContentService. But there maybe some usefull code as well.
Dave
Hi guys
Awesome thanks! Nice examples!
h5yr all
is working on a reply...