Hi folks, I would like to access a member’s labels from the post.hbs file.
Here is the code I am using to show the labels on the post if the member is logged in and not paid:
<section class="gh-content gh-canvas">
{{#if @member}}
{{#if @member.paid}}
{{content}}
{{else}}
<div class="gh-login-prompt">
<p>Post URL: {{url}}</p>
{{#if @member.labels}}
{{#each @member.labels}}
<p>{{this}}</p>
{{/each}}
{{else}}
<p>No labels associated with this member.</p>
{{/if}}
</div>
{{/if}}
{{else}}
<div class="gh-login-prompt">
<p>Please <a href="{{@site.url}}/#/portal/signin">log in</a> or <a href="{{@site.url}}/#/portal/signup">sign up</a> to view this content.</p>
<p><a href="{{url}}">View Post</a></p>
</div>
{{/if}}
</section>
Currently, this is just showing “No labels associated with this member.” even though there are multiple labels associated with this member.