[wp-trac] [WordPress Trac] #12877: Modular themes: Apply template hierarchy to folders within a theme
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 14 16:25:21 UTC 2010
#12877: Modular themes: Apply template hierarchy to folders within a theme
-----------------------------+----------------------------------------------
Reporter: koopersmith | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Future Release
Component: Themes | Version: 3.0
Severity: normal | Keywords: has-patch
-----------------------------+----------------------------------------------
Comment(by willnorris):
@FJKaiser: I'm not sure I follow. get_template_module() supports all the
same template file names that the normal template system supports. So if
I call {{{get_template_module('foo')}}} during a request for an author
page, then it will try to load the following template files, stopping at
the first one it finds:
* {{{STYLESHEETPATH . "/foo/author-{$author}.php"}}}
* {{{TEMPLATEPATH . "/foo/author-{$author}.php"}}}
* {{{STYLESHEETPATH . "/foo/author-{$author_id}.php"}}}
* {{{TEMPLATEPATH . "/foo/author-{$author_id}.php"}}}
* {{{STYLESHEETPATH . "/foo/author.php"}}}
* {{{TEMPLATEPATH . "/foo/author.php"}}}
And if a plugin implements the {{{author_template}}} filter to provide an
alternate template name, that will be applied to
{{{get_template_module()}}} as well.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12877#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list