Skip to:
Content
Pages
Categories
Search
Top
Bottom

Manually Creating Links

  • @alanchrishughes

    Participant

    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

    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

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

    @modemlooper

    Moderator

    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

    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

    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

    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

    bp_group_permalink(); ?>home

    @alanchrishughes

    Participant

    Ahhhh, thank you very much.

    @myvahid

    Participant

    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