Unfortunately at the moment it only indexes content stored in rte's.
It does not index content stored in an rte within a custom grid editor. I was wondering if anyone could give me some pointers of how to extend my ExamineIndexer class to also include this.
I did something like this not so long ago. You will need to create your own classes for parsing your custom grid editors and work your way down the JSon tree of data. The more nested controls the more complex it can become.
I was involved in creating one that indexed an accordion grid editor control which could have an unlimited number of accordion cells in it.
I used that exact code example as my base.
To start with create your own classes that inherit from GridControl which I believe is the name of the base class from LeBlender.
Hi thanks for the pointer, I'm a bit stuck - bit of a c# beginner to be honest.
I've got a grid editor with the alias 'cardPopup'
I've implemented a class: GridControlCardPopupValue
using Newtonsoft.Json;
using Skybrud.Umbraco.GridData.Interfaces;
public class GridControlCardPopupValue : IGridControlValue {
[JsonProperty("caption")]
public string Caption { get; set; }
[JsonProperty("content")]
public string Content { get; set; }
}
And initialized it at startup
using Umbraco.Core;
using Newtonsoft.Json.Linq;
using Skybrud.Umbraco.GridData;
public class GridStartup : ApplicationEventHandler {
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) {
GridContext.Current["cardPopup"] = token => token.ToObject<GridControlCardPopupValue>();
}
}
But it's throwing up
CS0535: 'GridControlCardPopupValue' does not implement interface member 'Skybrud.Umbraco.GridData.Interfaces.IGridControlValue.Control'
I tried changing to implement like so:
public class GridControlCardPopupValue : Skybrud.Umbraco.GridData.Interfaces.IGridControlValue.Control {
but it throws up: The type name 'Control' does not exist in the type 'Skybrud.Umbraco.GridData.Interfaces.IGridControlValue'
+1 for Full Text Search. It was the only thing that was able to provide search functionality properly. The out-of-the-box stuff is woefully behind in terms of supporting grid content
Indexing / Searching Leblender grid editor content.
I've managed to get search working for the umbraco grid by following this tutorial: https://gist.github.com/abjerner/bdd89e0788d274ec5a33. Why this functionality is not umbraco core I don't know but anyway...
Unfortunately at the moment it only indexes content stored in rte's.
It does not index content stored in an rte within a custom grid editor. I was wondering if anyone could give me some pointers of how to extend my ExamineIndexer class to also include this.
Many thanks :)
I did something like this not so long ago. You will need to create your own classes for parsing your custom grid editors and work your way down the JSon tree of data. The more nested controls the more complex it can become.
I was involved in creating one that indexed an accordion grid editor control which could have an unlimited number of accordion cells in it.
I used that exact code example as my base.
To start with create your own classes that inherit from GridControl which I believe is the name of the base class from LeBlender.
Hi thanks for the pointer, I'm a bit stuck - bit of a c# beginner to be honest.
I've got a grid editor with the alias 'cardPopup'
I've implemented a class: GridControlCardPopupValue
And initialized it at startup
But it's throwing up
CS0535: 'GridControlCardPopupValue' does not implement interface member 'Skybrud.Umbraco.GridData.Interfaces.IGridControlValue.Control'
I tried changing to implement like so:
but it throws up: The type name 'Control' does not exist in the type 'Skybrud.Umbraco.GridData.Interfaces.IGridControlValue'
Am I heading in the right direction?
Have you considered the Full Text Search package?
It searches the actual content of the rendered page. I've used it on a couple of sites using the grid and Archetype with good results.
https://our.umbraco.org/projects/website-utilities/full-text-search
Thank you this looks perfect!
+1 for Full Text Search. It was the only thing that was able to provide search functionality properly. The out-of-the-box stuff is woefully behind in terms of supporting grid content
is working on a reply...