Forum Discussion

keithkelly's avatar
6 months ago

Group Hub - Adding "Start a conversation" button

Is it possible (or how hard would it be) to create a button that starts a conversation in the Group Hub's forum?  

I can hardcode it like so:  

<a href="/t5/forums/postpage/board-id/BetaGHforum-board" class="lia-button lia-button-primary">Start a Discussion</a>

But that's not ideal.

We're using Group Hubs that only contain a forum (no TKB, blog, or ideas), so clicking the "Forum" button feels like an unnecessary step.

  • Update:  I think I found a decent way to do it.   Please tell me if and where I'm being senseless:

    <div class="custom-start-conversation-button">
      <a class="lia-button lia-button-primary" href="/t5/forums/postpage/board-id/${coreNode.id}forum-board">Start a Discussion</a>
    </div>
    • MattV's avatar
      MattV
      Khoros Staff

      I'd call that "hacky" but also "good enough". It's a bit fragile, but for what you're trying to do, it will work.

      The "right" way, would be to make a LiQL call to get the list of child boards, constrained to forum, and then get the id of the forum.

      You could add some logic around the button too to show it as disabled or hidden if the user isn't logged in or not a member of the grouphub, or also hide the button if the component is placed outside of a grouphub.

  • Wait, I’m confused. It seems like OOTB behavior to have a “start a topic” button on a group hub home page.

    Example: the Titans hub here on Atlas: 

    • keithkelly's avatar
      keithkelly
      Leader

      wait what!?  ...hmmm....

      Ohhhh.... we're using a custom message list.  That button is part of the OOTB message list isn't it!