Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add a Link to Groups Directory Page Menu?

  • I’ve searched and searched (here and the net as a whole) and haven’t found any comprehensive tutorial or advice that I understand on adding a top level item to the Groups menu. For example, here’s what the menu bar on the groups directory page looks like by default (for a logged in user):

    All Groups (n) My Groups (n)

    What I need is to add an item to that list that links directly to a hardcoded URL that links to a group tag URL (I’m using the group tags plugin), so the menu would then look like this:

    All Groups (n) My Groups (n) Official Groups

    I really don’t care if it includes the “(n)” part for the official groups link. I’ve tried adding the following code into my bp-default/groups/index.php at the beginning of, at the end of, and in between the current links to “All Groups” and “My groups”, but clicking on my added menu item results in being shown All Groups (and I know that not all of my groups are tagged with the tag called in the URL I’m using). Tried it with and without the “selected” class, and with and without the id, but nothing changed:

    {li class="selected" id="groups-all"}{a href="http://www.clothunderground.com/groups/tag/cuofficial"}Official Groups{/a}{/li}

    html brackets replaced with curly brackets b/c I have no idea how to make code show up here!

    Can anyone help me out with this? PLEASE? It just seems like it should be a simple thing!

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

  • Brajesh Singh
    Participant

    @sbrajesh

    Since the tabs are loaded via ajax, you have two options.
    1.Write an appropriate filter to send the response via ajax
    2. Or just make the group tabs use non ajax loading
    here is how you do the second
    Edit the line in your groups/index.php
    <div class=”item-list-tabs”>
    and make it
    <div class=”item-list-tabs no-ajax”>

    It should work.

    Awesome, thank you! I just used solution #2 b/c #1 is way over my head.

    New problem, though…no matter which tab is clicked/active, “My Groups” is always highlighted as the selected one. Also, the “order by” returns a list of all of the groups, even when I’m trying to filter my page of specifically tagged groups that I linked to. Would solution 1 solve these issues, and if so, is it the sort of thing that someone could provide me a code snippet to copy/paste? Because that I could do.

    Bump! Using solution #2 did work to add the link, but I just don’t think I want to sacrifice the sorting and “active” tab highlighting (which is what it’s caused).

    Can anyone walk me through implementing solution #1 mentioned by @sbrajesh?


    Dwenaus
    Participant

    @dwenaus

    I have been doing this, it is very painful. look at my group tags plugin for code that you can use. not very elegant, and maybe there is a better way. I sure wish there was. Right now i’m experimenting with going with no-ajax and see how that pans out.

    I wouldn’t even know where to begin to look in the tags plugin, lol!

    hello in here!

    @Dwenaus: is this the piece of code from the group tags plugin that I’m supposed to be looking at? I’m not sure what to do with it :/

    http://pastebin.com/KgTux0ys

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add a Link to Groups Directory Page Menu?’ is closed to new replies.
Skip to toolbar