HTML from Sitecore Wildcard item pages
Coveo Pro Cloud / Coveo for Sitecore 4.0 (build 450) / Sitecore 8.0 update 3
I'm integrating Coveo with a mature and heavily customized Sitecore implementation, which makes extensive use of wildcard items. For example product ranges with the site are structured as follows
- Range Page 1
- Range Page 2
- Range Page 1
- Site Data
- Product 1
- Product 2
- Product 3
As you can see, a wildcard page exists under each "range page". The actual product items are in a "Site Data" section outside the site root.
I want to index HTML content from each of the product wildcard pages.
I know that Coveo for Sitecore has a number of extension points to allow such behaviour. After taking advice from Stack Exchange, I created a processor in coveoItemProcessingPipeline which adds the appropriate product items whenever a * item is crawled. That works, and the associated product items get added to the index as expected.
However the HTML is not getting added to the index, via the included HtmlContentInBodyWithRequestsProcessor processor.
I've decompiled that processor and I can see that the code expects the item to have layout. In normal circumstances that;'s fine, but with these product wildcard pages the layout is taken from the from the * item, not the product item itself.
I think I could create a custom version of the processor to remove the "Has layout" requirement, but I want to check if there is a simpler or "recommended" way.
One thing to make sure would be to include your new processor before the HtmlContentInBodyWithRequestsProcessor processor. That is because the HTML one should run after the current item URL is set.
I've never experimented with wildcard items. Is it possible to set a layout and renderings on the wildcard item itself? That would be what I would try first.
If it is not possible, you could try copying the layout, renderings and final renderings fields from the item with a layout to the new items you create in your processor.
I hope this helps,