Adds support for @mentions. Implementing this will add the content type to the list of content found using @mentions.
IMentionableContentType
is defined in the Telligent.Evolution.Extensibility.Content.Version2
namespace of Telligent.Evolution.Platform.dll
Definition
interface IMentionableContentType : IContentType, IPlugin { IEnumerable<IContent> GetMentionables(string queryText, MentionableContext filter); string GetMentionPreviewHtml(Guid contentId, MentionPreviewOptions options); string GetMentionViewHtml(Guid contentId, MentionViewOptions options); }
Methods
IEnumerable<IContent> GetMentionables(string queryText, MentionableContext filter);
This method is called to find matches when a user starts an @mention. The content returned should match the queryText in the title of the content. Content returned should only be that which the specified user can view.
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
queryText | string | Query Text | Required | ||
filter | MentionableContext | Filter | Required |
Return Type
IEnumerable<IContent>
string GetMentionPreviewHtml(Guid contentId, MentionPreviewOptions options);
Specifies the html for generating a preview of the @mention of the specified content.
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
options | MentionPreviewOptions | Options | Required |
Return Type
string
string GetMentionViewHtml(Guid contentId, MentionViewOptions options);
Specifies the html used to render the @mention of the content in the parent content. This is commonly the title of the content linked to itself on the site.
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
options | MentionViewOptions | Options | Required |
Return Type
string