Community Help Center: conditionally add class based on forum poster's organization_id (via handlebars)

回答済み

4 コメント

  • Nicole - Community Manager
    コメントアクション Permalink

    Hey Dan - 

    I can't advise on how to do that, but does it necessarily need to be a border? Would adding badges to those users' avatars serve the purpose for you? We do have a tip on how to do that: 

    How to add cool Agent badges in Communities

    0
  • Dan Tabibzadeh
    コメントアクション Permalink

    Hi Nicole,

    Thank you for the swift answer! The main reason I didn't want to use JavaScript for this was because the list of users in said organization will be variable -- hence, we don't want to have to re-update the JS every time the list changes.

    Edit - the method I'm currently employing (unscalable):

    <div class="post {{#is author.name 'XXXXX1'}}custom-class{{/is}} {{#is author.name 'XXXXX2'}}custom-class{{/is}}">

    ...which essentially does do the trick -- similar to the methodology as in the 'how to add cool agent badges in communities' article -- but we want to utilize a Zendesk feature (such as organization or tag) to make this process a less manual effort. Hope that makes sense.

    0
  • Nicole - Community Manager
    コメントアクション Permalink

    Ah, that makes sense.

    It's not an immediate fix for you, but I know that there is some functionality currently being worked on that would allow you to badge users based on user segment, which can be based on organization. We don't have an ETA yet, but if you can hold tight on this for a little while, we should have a solution for this native in the product before the end of the year (and hopefully sooner than that!)

    0
  • Dan Tabibzadeh
    コメントアクション Permalink

    Thanks Nicole,

    I'll let my team know it's in development. For now, we'll utilize our old approach.

    0

ログインしてコメントを残してください。

Powered by Zendesk