<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>feature UI Component</title><link>https://community.telligent.com/community/11/w/api-documentation/67179/feature-ui-component</link><description /><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>feature UI Component</title><link>https://community.telligent.com/community/11/w/api-documentation/67179/feature-ui-component</link><pubDate>Tue, 19 Nov 2019 20:28:35 GMT</pubDate><guid isPermaLink="false">68a0126c-3583-44f7-b731-71903d54ddee</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/api-documentation/67179/feature-ui-component#comments</comments><description>Current Revision posted to API Documentation by Ben Tiedt on 11/19/2019 20:28:35&lt;br /&gt;
&lt;hr class="generated-documentation-start" style="border-width:0;" /&gt;&lt;h3&gt;&lt;a id="jQuery_telligent_evolution_ui_components_feature" name="jQuery_telligent_evolution_ui_components_feature"&gt;&lt;/a&gt;jQuery.telligent.evolution.ui.components.feature&lt;/h3&gt;
&lt;p&gt;[[ui JavaScript API Module|UI Component]] which handles presentation of feature behavior for content. Transforms the output from &lt;code&gt;$core_v2_ui.Feature()&lt;/code&gt;, which is a &lt;code&gt;&amp;lt;span class=&amp;quot;ui-feature&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/code&gt; stub. The default implementation uses the [[evolutionFeature jQuery Plugin|evolutionFeature plugin]]. [[ui JavaScript API Module|Overrides can be provided]] at the theme level to present features differently.&lt;/p&gt;
&lt;h3&gt;&lt;a id="Options" name="Options"&gt;&lt;/a&gt;Options&lt;/h3&gt;
&lt;p&gt;Data made available to instances of the component:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;contenttypeid&lt;/code&gt;: (string) Content Type Id Guid&lt;/li&gt;
&lt;li&gt;&lt;code&gt;contentid&lt;/code&gt;: (string) Content Id Guid&lt;/li&gt;
&lt;li&gt;&lt;code&gt;typeid&lt;/code&gt;: (string) Feature Type Id Guid&lt;/li&gt;
&lt;li&gt;&lt;code&gt;value&lt;/code&gt;: (string) If the content is featured or not by the accessing user (&lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;contenttypename&lt;/code&gt;: (string) Type name for this content&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a id="Example" name="Example"&gt;&lt;/a&gt;Example&lt;/h3&gt;
&lt;p&gt;A barebones UI component override which would result in rendering a read-only message of &amp;#39;Featured? Yes/No&amp;#39; for a given call to &lt;code&gt;$core_v2_ui.Feature()&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$.telligent.evolution.ui.components.feature = {
    setup: function() {
    },
    add: function(elm, options) {
        $(elm).html(&amp;#39;Featured? &amp;#39; + (options.value == &amp;#39;true&amp;#39; ? &amp;#39;Yes&amp;#39; : &amp;#39;No&amp;#39;));

        console.log(&amp;#39;ContentId: &amp;#39; + options.contentid);
        console.log(&amp;#39;ContentTypeId: &amp;#39; + options.contenttypeid);
        console.log(&amp;#39;TypeId: &amp;#39; + options.typeid);
        console.log(&amp;#39;PanelUrl: &amp;#39; + options.panelurl);
        console.log(&amp;#39;Value: &amp;#39; + options.value);
        console.log(&amp;#39;ContentTypeName: &amp;#39; + options.contenttypename);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&lt;a id="Default_Implementation" name="Default_Implementation"&gt;&lt;/a&gt;Default Implementation&lt;/h3&gt;
&lt;p&gt;For reference purposes or as the basis for an override:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$.telligent.evolution.ui.components.feature = {
    setup: function() {
    },
    add: function(elm, options) {

        elm.empty();

        var config = {
            contentId: options.contentid,
            contentTypeId: options.contenttypeid,
            typeId: options.typeid,
            panelUrl: options.panelurl,
            initialState: options.value == &amp;#39;true&amp;#39;,
            contentTypeName: options.contenttypename,
            onClick: function(panelUrl, complete) {
&lt;/code&gt;&lt;/pre&gt;

&lt;hr class="generated-documentation-end" style="border-width:0;" /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>