<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Bookmarks</title><link>https://community.telligent.com/community/11/w/developer-training/65102/bookmarks</link><description /><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>Bookmarks</title><link>https://community.telligent.com/community/11/w/developer-training/65102/bookmarks</link><pubDate>Thu, 13 Jun 2019 19:28:31 GMT</pubDate><guid isPermaLink="false">e4d52acd-3e03-46ca-a41a-6839a7bf9739</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65102/bookmarks#comments</comments><description>Current Revision posted to Developer Training by Ben Tiedt on 06/13/2019 19:28:31&lt;br /&gt;
&lt;p&gt;The [[api-documentation:IBookmarkableContentType Plugin Type|IBookmarkableContentType]] interface provides support for bookmarking content.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h3&gt;&lt;a id="Why_should_I_make_my_content_bookmarkable" name="Why_should_I_make_my_content_bookmarkable"&gt;&lt;/a&gt;Why should I make my content bookmarkable?&lt;/h3&gt;
&lt;p&gt;It can be important for users to save content. If you are creating a schedule users may want to return to this content and review it for changes.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;&lt;a id="Creating_an_IBookmarkableContentType_plugin" name="Creating_an_IBookmarkableContentType_plugin"&gt;&lt;/a&gt;Creating an IBookmarkableContentType plugin&lt;/h3&gt;
&lt;p&gt;[[api-documentation:IBookmarkableContentType Plugin Type|IBookmarkableContentType]] is defined in the &lt;code&gt;Telligent.Evolution.Extensibility.Content.Version1&lt;/code&gt; namespace of &lt;code&gt;Telligent.Evolution.Core.dll&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It is important to note that one or more Core Services can be implemented in the same [[api-documentation:IContentType Plugin Type|IContentType]] class.&lt;/p&gt;
&lt;p&gt;This interface is similar to the others, it requires you to define whether a user can bookmark or unbookmark content. It also should return if the content supports bookmarks. In this sample we arbitrarily selected the&amp;nbsp;&lt;a href="/documentation/w/telligent-community-90/51695.permissions-defined#Group"&gt;Read Group Members&lt;/a&gt; permission but any permission can be defined here.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;public bool CanBookmark(Guid contentId, int userId)
{
    return CanUseBookmarks(contentId, userId);
}

public bool CanUnBookmark(Guid contentId, int userId)
{
    return CanUseBookmarks(contentId, userId);
}

public bool SupportsBookmarks
{
    get { return true; }
}

private bool CanUseBookmarks(Guid contentId, int userId)
{
    var content = LinksData.GetLink(contentId);
    if (content == null) { return false; }

    var read = new Guid(&amp;quot;4F692E0C-9CAB-4d09-9126-684FAF41A085&amp;quot;);
    var permission = Apis.Get&amp;lt;IPermissions&amp;gt;().Get(read, userId, content.ContentId, content.ContentTypeId);
    return permission.IsAllowed;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here is the full sample.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://community.telligent.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-12-83/2727_2E00_LinkItemContentType_2E00_cs"&gt;community.telligent.com/.../2727_2E00_LinkItemContentType_2E00_cs&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>