Skip to:
Content
Pages
Categories
Search
Top
Bottom

group loop – how to pass in parameters – developer question


  • Dwenaus
    Participant

    @dwenaus

    I’ve been at this for hours, and I just can’t seem to figure out how to pass things into the group loop so that I can list the groups differently than just newest, popular, etc. The way the group loop is processed is quite complex.

    should I be filtering bp_has_groups or groups_get_groups or bp_dtheme_ajax_querystring or something else?

    and how do I get my ajax call to filter those?

Viewing 3 replies - 1 through 3 (of 3 total)

  • Brajesh Singh
    Participant

    @sbrajesh

    you should filter on

    bp_ajax_querystring

    Watch How Andy has done it in ‘bp_dtheme_ajax_querystring`

    Just extend it when the object is groups and manipulate as you want.


    Dwenaus
    Participant

    @dwenaus

    @sbrajesh – thanks so much for the reply. can you give a quick example maybe of how that is done.

    I’ve got a link passing to a function using ajax, and I’m not sure how to connect the ajax data so that it changes the groups listed. adding the filter hook in the ajax function does not seem to work.

    I need to pass in my own function call to great groups similar to the ones in groups_get_groups(). (ie. $groups = BP_Groups_Group::get_active()) where should I put that?


    Dwenaus
    Participant

    @dwenaus

    in case anyone else needs to do this. hooking into groups_get_groups was the right way to go. bp_has_groups also worked. I believe Brajesh’s suggestion is correct if you just want to alter how groups are displayed with the existing structure. I but I wanted to create a new way to view groups: by tags.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘group loop – how to pass in parameters – developer question’ is closed to new replies.
Skip to toolbar