[wp-trac] [WordPress Trac] #15803: Page Templates within Plugins
WordPress Trac
wp-trac at lists.automattic.com
Mon Dec 13 23:50:09 UTC 2010
#15803: Page Templates within Plugins
-----------------------------+----------------------------------------------
Reporter: sterlo | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version:
Severity: normal | Keywords:
-----------------------------+----------------------------------------------
Comment(by sterlo):
Replying to [comment:4 coffee2code]:
> Implementation of my most recent patch for #13239 can achieve this
(among other things).
>
> In fact, my latest comment there includes example code for a plugin to
override theme templates (by giving preference to templates defined in a
sub-directory of the plugin's directory), which appears to be exactly what
you're requesting.
>
> Depending on what you're doing and how you're doing it, though, your
"theme independence" may meet with varying success in practice.
Thank you!
'''What I got from that''': Plugins should not provide Page Templates
because the environment they would operate in is dependent on the Theme by
nature.
'''What I am thinking in regards to that''':
As for the conflicts/varying success: I suppose if you name-spaced your
markup and included your own CSS...it would turn out fine?
A Theme includes it's Header/Footer - which may/may-not contain a wrapper
around the content. But the code for the plugin's template can be written
in such a way that it renders successfully with or without a container.
For instance - a plugin that interacts with an outside API and returns
data - but it needs to have it's own template to allow the user to
manipulate that data.
It can be built in a modular fashion so that it works independent of any
theme.
'''As for the patch''': Looks good to me. If it does what it needs to do
then it would probably solve my needs.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15803#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list