variable 'content' of type 'EPiServer.Find.UnifiedSearch.ISearchContent' referenced from scope '', but it is not defined
I've tried various permutations on this. Anyone know the right way to do it?
By the way, I think the code is built this way instead of using the unified search features because the categories aren't well represented in the code. For instance, the "Article" category displayed to the user consists of multiple page types that don't share a common class in the code. At least not a common class that distinguishes them from other categories.
I'm working on a search solution using unified search that has a few category filters.
When making the filterfacets to display the number of results to be expected in each category, the code looks like
then, when actually filtering the results, the code looks like
So it seems like this should be the same thing, because it's the exact same code, but I'm having a bit of trouble separating it.
If I make it an extension method like this, for instance
Then there's no repetition
But I get a runtime exception
I've tried various permutations on this. Anyone know the right way to do it?
By the way, I think the code is built this way instead of using the unified search features because the categories aren't well represented in the code. For instance, the "Article" category displayed to the user consists of multiple page types that don't share a common class in the code. At least not a common class that distinguishes them from other categories.