Skip to:
Content
Pages
Categories
Search
Top
Bottom

Manually Creating Links


  • alanchrishughes
    Participant

    @alanchrishughes

    Is there anything similar to

    echo bp_loggedin_user_domain() ?>activity/friends/

    but for groups, so you can design your own navigation? I’ve looked through the docs but I don’t seem to see anything.

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

  • modemlooper
    Moderator

    @modemlooper

    Can’t you just write the URL? The reason for the loggedin function is because the link is different for every user but a group is the same URL regardless of who’s accessing the group


    alanchrishughes
    Participant

    @alanchrishughes

    That’s why I would need something to generate whatever the group url is because each group name is different.


    modemlooper
    Moderator

    @modemlooper

    Where is the navigation? Do you want to create a nav bar with every group as a tab? The only way is to do a group loop like the group directory.


    alanchrishughes
    Participant

    @alanchrishughes

    I must not be explaining things right, I am talking about a groups navy bar

    get_bp_group_domain() ?>home
    get_bp_group_domain() ?>admin
    get_bp_group_domain() ?>forum
    get_bp_group_domain() ?>members
    get_bp_group_domain() ?>send-invites

    And a new topic link, etc.


    modemlooper
    Moderator

    @modemlooper

    No way to do that unless you are on the groups page. If you are on the group page then this bp_get_options_nav(); ?> gets the nav items you want.


    alanchrishughes
    Participant

    @alanchrishughes

    Normally this would be a piece of cake, I would just look at the template file and there the answer would be, but the only thing here is one swooping

    bp_get_options_nav();

    that generates all the links at once.


    modemlooper
    Moderator

    @modemlooper

    bp_group_permalink(); ?>home


    alanchrishughes
    Participant

    @alanchrishughes

    Ahhhh, thank you very much.


    myvahid
    Participant

    @myvahid

    You can use trailingslash*t() for making safe URL

    Group permalink example :

    $group = groups_get_group( array( ‘group_id’ => $group_id ) );
    $group_permalink = trailingslash*t( bp_get_root_domain() . ‘/’ . bp_get_groups_root_slug() . ‘/’ . $group->slug . ‘/’ ) );

    trailingslash*t => * = i

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Manually Creating Links’ is closed to new replies.
Skip to toolbar