On Tue, Sep 02, 2008 at 09:50:51PM -0400, Owen Winkler wrote:
> 
> Michael C. Harris wrote:
> > 
> > An implementation question (or four); what would themes advertise in
> > their XML ?  A variable to fill ? A selector of some kind, like a CSS
> > ID ? What advantage would having them in the XML give us, as opposed
> > to a standard function call to, for example, hardpoints() ?
> 
> The advantage to having it in the theme's XML is that you can know about 
> the places to which a theme supports output before activating the theme.

That sounds like a good reason. 

> Our interface could highlight the hardpoint names that are in use.  For 
> example, the listing for a theme named Aardvark could look like this:
> 
> Theme name: Aardvark     [Activate]
> Supported Hardpoints:  *sidebar*  footer  ?header?
> 
> "*sidebar*" would be bold (or something) indicating that your current 
> theme outputs data to that hardpoint.  "?header?" would be red (or 
> something) indicating that the data output to the "header" hardpoint 
> will have no place to go in this theme.  Or something useful like that.

It sounds like you're suggesting that the core would define a list of
hardpoints, plugins would send output to a particular hardpoint by
default, and theme authors would choose to support some subset of the
listed hardpoints, which would be advertised in the XML. Users could
override the plugin's default hardpoint and choose to have the data
output to a different hardpoint. Is that what you're meaning ?

It might be useful to support templates for the hardpoints, for
example sidebar.hardpoint.php, which would typically be an li or a
div. Other templates could $theme->display( 'sidebar.hardpoint' )
(with appropriate markup, for example inside a ul) and this would then
be called for each plugin that outputs there.

> The key point being that if you rely on what functions are called to 
> know what hardpoint names are available in the theme, then it becomes 
> difficult to know what they are without activating the theme first.

The active theme is currently activated in the admin anyway, so that
you can configure it. Do we really need to see the available
hardpoints of non-active themes ? I'm still not convinced that a
function that returns an array of supported hardpoints isn't simpler.

-- 
Michael C. Harris, School of CS&IT, RMIT University
http://twofishcreative.com/michael/blog
IRC: michaeltwofish #habari

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/habari-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to