Forum Discussion

keithkelly's avatar
6 months ago

Increase the "My Group Hubs" list to more than 5?

I'm hoping there's an admin setting, or a "count" attribute to add to the component call.  

If not, I'd like to create a custom component, but looking through the grouphub object reference, I don't see a constraint to return only "my" group hubs.

Is there a way to either:

  • Increase the # of items shown in the list, or
  • select foo, bar, baz from grouphubs where I'm a member

Any help would be super-appreciated!

  • As far as I can tell there's no configuration option for this OOB component (I'm also not aware of a setting within admin):


    but if I remember correctly you can get all membership nodes (optionally for a specific node type, e.g. grouphubs in your case) for a user via API v2.0 like this:

     

    SELECT * FROM nodes WHERE user.id = '<id>' AND node_type = 'grouphub'

     


    EDIT: found the docs (gotta dig deep ๐Ÿ˜‰https://developer.khoros.com/khoroscommunitydevdocs/docs/membership-liql-examples

    • Oh thatโ€™s a promising approach.  Twisted minds inspire, right?

  • keithkelly  Please find the below query to get group hub details where I am a member.
    my group hub details query: 

    select * from nodes where user.id='${user.id?c}' AND node_type= 'grouphub' limit 1000
     
    my group hubs count query: 
     
    select count(*) from nodes where user.id='${user.id?c}' AND node_type= 'grouphub' limit 1000
  • While the group config in Admin does not apply to the My Group Hubs component as stated by ScottR and CarolineS , the setting could still be used to configure a custom component built based on the query posted above (setting the LIMIT) though, just make sure you don't accidentally re-configure the My Groups component if you are still using old style groups.

    The setting key for that one is: 

    groups.max_groups_in_widget
  • ScottR's avatar
    ScottR
    Khoros Expert

    In Classic: Admin > Discussion Styles > Groups > Settings Tab > "Number of groups in the Groups and My Groups components" default is 5.

    • CarolineS's avatar
      CarolineS
      Boss

      ScottR The things in the Discussion Styles > Groups section generally apply to the old groups (pre-Group Hubs, based on a forum). Are you sure this config works for group hubs? (I havenโ€™t checked :))

      • ScottR's avatar
        ScottR
        Khoros Expert

        Good catch! My bad. Group HUBS cap at 5 with a 'View all" button. This is a developer forum, the other options posted here I bow down to their elegance. ๐Ÿ™‚