BuddyDev

Search

[Resolved] Group tabs

  • Participant
    Level: Master
    Posts: 279
    NikB on #45507

    Greetings

    I’ve successfully created an “Events” tab to the Buddypress Groups tabs.

    Now I want to add two “sub” tabs ie. “Events” and “Create an event”.

    I’ve been using bp_core_new_subnav_item(with the “parent” slug as groups/group-name-events) to add two new sub (or are they actually sub-sub) tabs showing but it’s just not working and I’m starting to wonder if it’s just me or maybe this isn’t even possible?

    Any thoughts would be much appreciated.

    Warm regards
    Nik

  • Participant
    Level: Master
    Posts: 279
    NikB on #45508

    Oops… don’t think I can edit the above but the “parent slug” example above should actually have been the parent URL and read as follows – groups/group-name/events…

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #45509

    Hi Nik,
    If you are thinking of sub nav as in User profile, the group does not list it even if you added.

    You do have access to our Group Tabs Creator, This plugin will add sub tabs for any new group tab. It will not help if you are registering via code.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    NikB on #45512

    Hi Brajesh

    Thank you for getting back to me so promptly.

    Yes I guess I do mean as in the User profile where I’ve successfully created tabs with sub navs in the past. Are you saying that Group profiles don’t work the same, even though you can still use the same (bp_core_new_subnav_item) function for the “top level” tab?

    I do have access to your Group Tabs Creator (although I might need to renew to update to the latest version) but are you suggesting that can create with code what can’t be achieved in a “standard” way ie. a new group tab with two sub navs?

    With many thanks again.
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #45513

    Hi Nik,
    There is no standard way to do it.

    Here is what we are doing with Group Tabs:-

    In the screen function for parent tab, we add a section for displaying a list of sub navs.
    These sub navs are generated by us by looking through all our registered sub navs for that particular parent(these are just plain links being generated with similar markup to sub nav).

    You may use this idea to achieve your goal.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    NikB on #45514

    Hi Brajesh

    As it happens, something along the lines of your suggestion had already crossed my mind 😉

    I always like to try and do things the right/clean way but in this case, it does seem that is the only way… and at least now I know I really was trying to achieve the impossible with the methods I was using.

    How strange that Buddypress doesn’t handle group navs in the same way as profile navs.

    Thank you again for your help.

    Regards
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #45517

    Hi Nik,

    It’s always good to look for better ways 🙂

    I am glad it is resolved.

    Regards
    Brajesh

The topic ‘ [Resolved] Group tabs’ is closed to new replies.

This topic is: resolved