I have a doc type when rendered grabs details from its children and referenced content through pickers. I'm in the process of putting together my custom indexer and figured it would be simplest for me to render the page, strip the html and inject the results into a field during GatheringNodeData event on the indexer. Well, this isn't as simple as I'd hope. I get a NullReferenceException executing this line of code:
private void GuideIndexerOnGatheringNodeData(object sender, IndexingNodeDataEventArgs e)
{
if (e.IndexType != IndexTypes.Content) return; // how did you get in here? Content only please
var node = new Node(e.NodeId);
// Magic suppose to happen here, instead I get a slice of Null pie in the face
var page = umbraco.library.RenderTemplate(node.Id, node.template);
// Do stuff will eventually go here
}
The node is legit. The template is legit. What I'm doing must not be. Any pointers out there?
Index Rendered Content in v6.1.3
I have a doc type when rendered grabs details from its children and referenced content through pickers. I'm in the process of putting together my custom indexer and figured it would be simplest for me to render the page, strip the html and inject the results into a field during GatheringNodeData event on the indexer. Well, this isn't as simple as I'd hope. I get a NullReferenceException executing this line of code:
The node is legit. The template is legit. What I'm doing must not be. Any pointers out there?
is working on a reply...