Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 13 years ago

#2649 closed defect (bug) (duplicate)

Add template hierarchy support into BuddyPress

Reported by: djpaul's profile DJPaul Owned by: djpaul's profile DJPaul
Milestone: 1.6 Priority: normal
Severity: normal Version:
Component: Core 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 14 years ago.
v1

Download all attachments as: .zip

Change History (10)

#1 @DJPaul
14 years ago

  • Keywords has-patch added
  • Owner set to DJPaul
  • Status changed from new to assigned

@DJPaul
14 years ago

v1

#2 @paulhastings0
14 years ago

  • Summary changed from Add template hierarchy support into BuddyPress to [patch] Add template hierarchy support into BuddyPress

#3 @DJPaul
14 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
14 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
14 years ago

  • Milestone changed from 1.3 to 1.4
  • Summary changed from [patch] Add template hierarchy support into BuddyPress to Add 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
14 years ago

WP13239 looks relevant

Version 0, edited 14 years ago by DJPaul (next)

#7 @sorich87
14 years ago

  • Cc sorich87@… added

#8 @DJPaul
13 years ago

  • Milestone changed from 1.6 to Future Release
  • Severity set to normal

#9 @DJPaul
13 years ago

  • Milestone changed from Future Release to 1.6
  • Resolution set to duplicate
  • Status changed from assigned to closed

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.