[buddypress-trac] [BuddyPress] #4639: Add template hierarchy support

buddypress-trac noreply at wordpress.org
Thu Nov 1 23:13:11 UTC 2012


#4639: Add template hierarchy support
--------------------------+------------------------------
 Reporter:  DJPaul        |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Theme         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+------------------------------

Comment (by boonebgorges):

 Are we talking about directories or single item pages?

 In the case of single-item pages (like groups), we should know by
 `bp_setup_globals` which group we're looking at. We don't have to wait for
 any `bp_has_groups()`.

 In the case of directories, it's true that the `$x_template` globals are
 important. But in that case, it would presumably be only for the template
 parts related to displaying a single item in the directory that we would
 need to know what group we're looking at. So,
 {{{
 if ( bp_has_groups() ) {
     while ( bp_groups() ) {
         bp_the_group();
         bp_locate_template( 'group' ); // or whatever
     }
 }
 }}}

 And by this point, we *do* have access to the template global.

 Or maybe I'm misunderstanding?

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4639#comment:16>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list