[buddypress-trac] [BuddyPress] #4639: Add template hierarchy support
buddypress-trac
noreply at wordpress.org
Mon Jun 10 09:01:09 UTC 2013
#4639: Add template hierarchy support
-------------------------+------------------
Reporter: DJPaul | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 1.8
Component: Theme | Version: 1.7
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------
Comment (by r-a-y):
refresh.02.patch addresses Boone's points from comment:48.
I'm going to reply to some of the points above:
> I personally like the idea of having ID/login/nicename-specific items in
the hierarchy
Instead of user ID / nicename checks, I would prefer roles as that would
be more useful. But since WP doesn't check for user roles in their own
template hierarchy by default, I'm not sure BP should do it either.
> Part of this whole issue was to get to these template parts but perhaps
I overlook some obvious means to this end or for that matter maybe I'm
just missing a glaring point in all this :)
> r-a-y, could you please post a brief summary of what the most recent
patch does, and the problem it's meant to solve?
My patch deals with adding a top-level template hierarchy depending on the
BuddyPress page you're on. This is similar to how WordPress handles its
[https://codex.wordpress.org/Template_Hierarchy template hierarchy].
I've written an unpublished codex article that describes this in more
depth:
http://codex.buddypress.org/?page_id=5853&preview=true (make sure you're
logged in to view)
> Part of this whole issue was to get to these template parts but perhaps
I overlook some obvious means to this end or for that matter maybe I'm
just missing a glaring point in all this :)
The patch '''does not''' cover the concept of a "template part hierarchy"
as [comment:description originally described in the "Some examples"
section of the ticket].
We could look at adding the second parameter to `bp_get_template_part()`
to all our template parts, but that could get messy fast.
We can probably create a new ticket to discuss template part hierarchy to
clear this ticket.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4639#comment:51>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list