Skip to:
Content

BuddyPress.org

Opened 16 years ago

Closed 15 years ago

#2649 closed defect (bug) (duplicate)

Add template hierarchy support into BuddyPress

Reported by: DJPaul Owned by: DJPaul
Priority: normal Milestone: 1.6
Component: Core Version:
Severity: normal Keywords: needs-patch
Cc: sorich87@…

Description

WordPress' template hierarchy allows it to use specific template files for specific pages, or fall back to a default.

The attached patch is a first-pass of introducing the same to BuddyPress, built against the trunk. It has been taken out of a custom plugin and it has a designed limitation that it won't affect the main page templates which are always included by bp_core_load_template().

Most of the BP-Default theme uses bp_core_load_template() to load a "main" template file which then includes an appropriate secondary template to build the page; the latter is where I decided to patch.

Attachments (1)

patch-2649.patch (3.4 KB ) - added by DJPaul 16 years ago.
v1

Download all attachments as: .zip

Change History (10)

#1 @DJPaul
16 years ago

  • Keywords has-patch added
  • Owner set to DJPaul
  • Status newassigned

@DJPaul
16 years ago

v1

#2 @paulhastings0
16 years ago

  • Summary Add template hierarchy support into BuddyPress[patch] Add template hierarchy support into BuddyPress

#3 @DJPaul
16 years ago

May I have some feedback on this please? I'd like to put it in trunk. Specifically whether to fetch item IDs for BP Core components; at the moment it uses part of the URL to keep things compatible with all plugins.

#4 @DJPaul
16 years ago

  • Keywords needs-patch added; has-patch removed

After some discussion with John on IRC, I'm going to look to see if I can make a forwards-compatible patch to enable this to work with WP 3.1. The plan is to retain existing behaviour if not on WP 3.1.

#5 @DJPaul
16 years ago

  • Milestone 1.31.4
  • Summary [patch] Add template hierarchy support into BuddyPressAdd template hierarchy support into BuddyPress

Bumping this to 1.4 as we'll need to ask for a filter to be added in WP Core to locate_template().

#6 @DJPaul
16 years ago

#WP13239 looks relevant

Last edited 16 years ago by DJPaul (previous) (diff)

#7 @sorich87
16 years ago

  • Cc sorich87@… added

#8 @DJPaul
15 years ago

  • Milestone 1.6Future Release
  • Severitynormal

#9 @DJPaul
15 years ago

  • Milestone Future Release1.6
  • Resolutionduplicate
  • Status assignedclosed

Closing in favour of #3741, which has the up-to-date approach for this sort of thing.

Note: See TracTickets for help on using tickets.