Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7901 closed feature request (worksforme)

Allow for multiple Members Directories in BP Nouveau

Reported by: dontdream's profile dontdream Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Templates Keywords:
Cc:

Description

Sometimes it can be nice to have multiple Members Directories, each customized in a different way, e.g. all the members, members living abroad, members living in the same city of the logged-in user and sharing the same interests, and so on.

With BP Legacy that was easy to achieve, you could simply use:

bp_get_template_part ('members/index');

to get another Members Directory, and then customize it as needed.

A working example is the plugin BP Profile Search using the shortcode [bps_directory] (see Custom Directories for details).

Unfortunately, if you select the BP Nouveau template pack, the additional directories are no longer rendered correctly (screenshot attached).

Is it possible to extend this 'multiple directories' BP Legacy feature to BP Nouveau?

Or, alternatively, is there a way for plugins to get an additional Members Directory with BP Nouveau?

Thank you for looking into this!

Attachments (1)

screenshot.png (63.6 KB) - added by dontdream 6 years ago.
Additional Members directory with BP Nouveau

Download all attachments as: .zip

Change History (5)

@dontdream
6 years ago

Additional Members directory with BP Nouveau

#1 @imath
6 years ago

  • Keywords reporter-feedback added

Hi @dontdream

Thanks for your feedback, to be sure I fully understand the need/issue to reproduce it :

You create a new WordPress page, put a shortcode in it that includes the members index template containing the members loop, is this right ?

#2 @dontdream
6 years ago

  • Keywords reporter-feedback removed

Hello @imath,

Yes, I created a new page "Members - second directory" and in the page content I entered:

[bps_directory]

With BP Legacy activated, that produces a working Members directory, while with BP Nouveau activated the result is as shown in the screenshot. Of course the shortcode needs the plugin BP Profile Search.

Thank you!

#3 @imath
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Hi @dontdream

I've looked at it. So here's a code you can study to adapt your plugin to make it work inside the BP Nouveau Template Pack.

https://gist.github.com/imath/b7426f9108ad870bfee3afe7eb06b4ab

I wouldn't recommend to touch anything to BP Nouveau, because as you will see in the code faking or adding an alternative "working" members directory even in BP Legacy it is not just a matter of templates :)

Moreover, if BuddyPress is using a unique WordPress page to display directories, there are reasons to do so.

Let's leave the way to plugins to have fun into this territory :)

I'm closing this ticket, because everything is already available to reach your customization need. Feel free to reopen if you think I'm wrong.

#4 @dontdream
6 years ago

Hi @imath,

I agree with your conclusions, and I appreciate the code sample you wrote.

Thank you!

Note: See TracTickets for help on using tickets.