<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Handlebars Context Scope in Adobe Social Questions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-social-questions/handlebars-context-scope/m-p/205219#M326</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(36, 39, 41); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif;"&gt;This data (or getter) is exposed through the&amp;nbsp;&lt;A href="https://docs.adobe.com/docs/en/aem/6-2/develop/communities/scf/server-customize.html#SocialComponent%20Interface" rel="nofollow noreferrer" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 89, 153); text-decoration-line: none; cursor: pointer;" target="_blank"&gt;SocialComponent&lt;/A&gt;&amp;nbsp;for this resource type. Only few objects are implicit available globally. So you need to define your own social component and implement (or extend existing component if some bundle exports it) such a getter. You can refer to the example scf projects (for example&amp;nbsp;&lt;A href="https://github.com/Adobe-Marketing-Cloud/aem-scf-sample-components-extension/blob/master/bundles/aem-scf-extensions/src/main/java/com/adobe/aem/scf/extensions/IdeaSocialComponent.java" rel="nofollow noreferrer" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 89, 153); text-decoration-line: none; cursor: pointer;" target="_blank"&gt;here&lt;/A&gt;) in&amp;nbsp;&lt;A href="https://github.com/Adobe-Marketing-Cloud/" rel="nofollow noreferrer" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 89, 153); text-decoration-line: none; cursor: pointer;" target="_blank"&gt;github&lt;/A&gt;&amp;nbsp;or look also in the&amp;nbsp;&lt;A href="https://docs.adobe.com/docs/en/aem/6-2/develop/code-samples.html" rel="nofollow noreferrer" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 89, 153); text-decoration-line: none; cursor: pointer;" target="_blank"&gt;adobe documentation&lt;/A&gt;.&lt;/P&gt;&lt;P style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(36, 39, 41); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif;"&gt;You can find all objects available in the context of the current path by appending .social.json (e.g. /content/community-components/en/forum/jcr:content/content/forum.social.json).This will expose all the variables (context) that can be used inside the template. answered at a stack overflow page:&amp;nbsp;&lt;A href="http://stackoverflow.com/questions/43082235/aem-social-communities-handlebars-context" target="_blank"&gt;http://stackoverflow.com/questions/43082235/aem-social-communities-handlebars-context&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 May 2017 05:21:46 GMT</pubDate>
    <dc:creator>Amit_Kumar</dc:creator>
    <dc:date>2017-05-05T05:21:46Z</dc:date>
    <item>
      <title>Handlebars Context Scope</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-social-questions/handlebars-context-scope/m-p/205218#M325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm trying to get a context named userAdmin from within the handlebars framework for AEM Social Communities. The userAdmin context checks if the logged in user is a member or a moderator.&lt;/P&gt;&lt;P&gt;We already have this code within&amp;nbsp;/libs/social/console/components/hbs/sitenavbar/sitenavbar.hbs at line number 54. With the below userAdmin context the Administration link appears only if the logged in user is a moderator/Community Admin&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {{#if userAdmin}}&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;li&amp;gt;&amp;lt;a href="{{adminUrl}}"&amp;gt;{{i18n "Administration"}}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {{/if}}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'm not able to fetch the same userAdmin&amp;nbsp;context within&amp;nbsp;/libs/social/messaging/components/hbs/messagebox/buttons.hbs at line number 36 where I want to the new message button only if the logged in user is a moderator/Community Admin&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {{#if userAdmin}} //Here the context is not available within&amp;nbsp;the&amp;nbsp;buttons.hbs&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type='submit' class='actionbuttons' id='newMessageButton' name='{{properties.replyURL}}' value='{{i18n "+ New Message"}}' /&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {{/if}}&lt;/P&gt;&lt;P&gt;Could you please help me to figure out a way to get the context available in sitenavbar to any other SCF component like messagebox or forums. I've also tried using options like {{../userAdmin}} and {{@rootuserAdmin}}&lt;/P&gt;&lt;P&gt;&amp;nbsp;Any suggestion or help would be great.&lt;/P&gt;&lt;P&gt;Thanks, Bharath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2017 23:49:42 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-social-questions/handlebars-context-scope/m-p/205218#M325</guid>
      <dc:creator>Bharath_valse</dc:creator>
      <dc:date>2017-03-28T23:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Handlebars Context Scope</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-social-questions/handlebars-context-scope/m-p/205219#M326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(36, 39, 41); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif;"&gt;This data (or getter) is exposed through the&amp;nbsp;&lt;A href="https://docs.adobe.com/docs/en/aem/6-2/develop/communities/scf/server-customize.html#SocialComponent%20Interface" rel="nofollow noreferrer" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 89, 153); text-decoration-line: none; cursor: pointer;" target="_blank"&gt;SocialComponent&lt;/A&gt;&amp;nbsp;for this resource type. Only few objects are implicit available globally. So you need to define your own social component and implement (or extend existing component if some bundle exports it) such a getter. You can refer to the example scf projects (for example&amp;nbsp;&lt;A href="https://github.com/Adobe-Marketing-Cloud/aem-scf-sample-components-extension/blob/master/bundles/aem-scf-extensions/src/main/java/com/adobe/aem/scf/extensions/IdeaSocialComponent.java" rel="nofollow noreferrer" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 89, 153); text-decoration-line: none; cursor: pointer;" target="_blank"&gt;here&lt;/A&gt;) in&amp;nbsp;&lt;A href="https://github.com/Adobe-Marketing-Cloud/" rel="nofollow noreferrer" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 89, 153); text-decoration-line: none; cursor: pointer;" target="_blank"&gt;github&lt;/A&gt;&amp;nbsp;or look also in the&amp;nbsp;&lt;A href="https://docs.adobe.com/docs/en/aem/6-2/develop/code-samples.html" rel="nofollow noreferrer" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 89, 153); text-decoration-line: none; cursor: pointer;" target="_blank"&gt;adobe documentation&lt;/A&gt;.&lt;/P&gt;&lt;P style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(36, 39, 41); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif;"&gt;You can find all objects available in the context of the current path by appending .social.json (e.g. /content/community-components/en/forum/jcr:content/content/forum.social.json).This will expose all the variables (context) that can be used inside the template. answered at a stack overflow page:&amp;nbsp;&lt;A href="http://stackoverflow.com/questions/43082235/aem-social-communities-handlebars-context" target="_blank"&gt;http://stackoverflow.com/questions/43082235/aem-social-communities-handlebars-context&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 05:21:46 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-social-questions/handlebars-context-scope/m-p/205219#M326</guid>
      <dc:creator>Amit_Kumar</dc:creator>
      <dc:date>2017-05-05T05:21:46Z</dc:date>
    </item>
  </channel>
</rss>

