Skip to:

Opened 9 years ago

Last modified 9 years ago

#6084 new defect (bug)

Single page template routing is inelegant

Reported by: r-a-y's profile r-a-y Owned by:
Milestone: Awaiting Contributions Priority: normal
Severity: normal Version:
Component: Core Keywords: needs-refresh


Split from #5552.

Summary - ticket:5552#comment:10:

All of this points to a deeper problem, which is that it's problematic for template routing - the selection of templates based on the current URL/component/action - to be happening inside of templates. Templates are loaded from the outside in (home.php contains settings.php contains plugins.php), and when the routing logic is inside of the templates, by the time you get to settings.php it's not possible to say "whoops, this actually isn't a settings page". Contrast this with what good WP themes do: get_template_part( 'content', get_post_format() ); is a single line that leaves the routing logic out of the template, where it can be filtered/modified independent of the template load order. Obviously, moving toward this kind of system is a ton of work, but I do think it's at the root of the trouble we're currently having.

Background: ticket:5552#comment:4, ticket:5552#comment:8.

Patch: attachment:5552.patch:ticket:5552

Change History (1)

#1 @DJPaul
9 years ago

  • Keywords needs-refresh added; has-patch removed
Note: See TracTickets for help on using tickets.