Skip to:
Content
Pages
Categories
Search
Top
Bottom

Using member types tabs for custom members directory filter

  • @gyrus

    Participant

    The system I’m building assigns members to particular local authorities, and each local authority has a particular member selected as the ‘primary contact’. On my BP members directory listing, I want to add a tab next to ‘All Members’ to just list ‘Primary Contacts’. I’m going to have to do some synching of metadata to then make it possible to filter the members loop for this – which should be fine. I’m just having trouble with the interface aspect.

    If I use the hook bp_members_directory_member_types to add a tab, the tab seems to automatically be hooked into an AJAX-based system which I can’t easily decipher.

    Should I be looking at registering ‘primary contact’ as a BP member type? And then the tab / filter will be added automatically? It’s just that we might want to use member types for something else, and I’ll have to do a different load of metadata synching to hook a type assigned to a member with the data that connects them as the primary contact for a local authority. Again, possible, but I’m not sure if that’s heading in the right direction.

    Or is there a way to add a custom tab that’s outside the member types system, especially the AJAX which is preventing just reloading the listing with a query parameter to filter.

    I’m on the latest versions of WP and BP.

Viewing 2 replies - 1 through 2 (of 2 total)
  • @shanebp

    Moderator

    @gyrus

    Participant

    Thanks. As far as I can see, the relevant section there that deals with the Members directory is looking at the ordering drop-down. It’s not what I would call a ‘filter’, i.e. filtering results by certain criteria to shown only a sub-section of members. I was thinking that the tabs (where currently there’s only ‘All Members’) would be the more suitable interface element to use. Is there are comparable way of tapping into that?

    Or are you saying that there’s no way of tapping into the tabs, and I’ll have to compromise by using the ordering drop-down, i.e. to order by the ‘primary contact’ custom field, showing those with it checked first. The list would still include those who aren’t primary contacts, but they would see those who are grouped together at least. They would then lose the ability to order by something else, so not ideal – but is this the best I can do with BP?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar