Hi all,
I have a custom content type implemented with support for both IReindexableSearchableContentType and IIndexedMentionableContentType. Both searching and @mentioning the content type works as expected.
Now I'm trying to implement IPeekableContentType, and having some difficulty. I wanted to take the easy way out and implement it with some hard-coded HTML, like this below.
string IPeekableContentType.GetViewHtml(IContent content, Target target) { var product = ProductsData.GetProduct(content.ContentId); string result = string.Format("<div style=\"background:yellow; padding:20px; border:2px solid black;\"><a style=\"font-size:120px; font-weight:bold;\" href=\"{0}\">{1}</a></div>", product.Url, product.Name); // log method name, parameters, and result Log(string.Format("IPeekableContentType.GetViewHtml({0}, {1}) => {2}", content.ContentId, target, result)); return result; }
For testing I am creating a new Blog Post and using the @mention function to mention the one of the custom content items. That all works. But when I hover over the link there is no pop-up, and in looking at the logs I don't even see the GetViewHtml() method being called.
I checked the widget in the footer and all content types are enabled for the hover.
What am I missing?
Does GetViewHtml have to implemented as a Widget, or is Html ok too?
Thanks in advance.