On Mon, 2005-08-15 at 11:30, Lance Lavandowska wrote:
> That is an interesting idea ("apply decorator"), but how could you
> would then specify alternate decorators?

well, there wouldn't be alternate decorators.  only one.  as you said below, 
there really isn't much need for having multiple decorators.

> 
> Setting alternate decorators was intended to be an uncommon occurence,
> but this is another place where experimental code (the whole decorator
> concept - only one template was implemented with a real _decorator)
> crept into a release without refinement.
> 
> I would suggest changing the "default" to be "no decorator" and
> reserve $decorator=my_decorator as the advanced (and only) use of
> decorators.  This way if $decorator does not have a value there will
> be no attempt to apply a decorator.

i agree.  my preference would be to ditch the concept of the decorator all 
together since i believe it's probably not used all the much, but it's likely 
too late for that.  the feature has been around for a while now and some themes 
even rely on it, so how could you do the migration?  you would have to rewrite 
user templates for anyone who was using a decorator, and that's just not going 
to happen.

i think we continue with the decorator, but we standardize it like i said.  
this would then give us the ability to provide some smart messaging when 
someone tries to edit their decorator so we can better school users on how the 
template is meant to work.

my guess is that 98% of template edits happen on one of the 4 main templates 
(Weblog, _day, _css, _decorator).  so if we standardize these templates and 
control them a little better we can *help* users when they go to make edits.  
give them messaging about how the decorator works and how to apply it, etc, etc.

-- Allen


> 
> Lance
> 
> On 8/15/05, Allen Gilliland <[EMAIL PROTECTED]> wrote:
> > hmmm ... well i've never seen anything like this available on the UI.
> > 
> > the code suggests that you could set a velocity variable named "decorator" 
> > to point to the page template name you want to use as a decorator, but i'm 
> > not sure that's really a nice way to do it.
> > 
> > i am suggesting that the "_decorator" template is a standard part of every 
> > weblogs page templates, so a user can't delete it or rename it.  then the 
> > user can *apply* it to any other pages they wish.  on the UI this would be 
> > indicated somewhere with a checkbox called "apply decorator?", or some 
> > other way to toggle it on/off for a given template.
> > 
> > -- Allen
> > 
> > 
> > On Mon, 2005-08-15 at 10:53, Lance Lavandowska wrote:
> > > The decorator is not necessarily an all-or-nothing proposal, you can
> > > specify the decorator to be used in each page template (you'll have to
> > > find Google's cache of my blog entry - this should be moved into the
> > > wiki, or look at the rendering source to see how it identifies the
> > > decorator to be used).  Also, the decorator can be a "no op", not
> > > writing any content of it's own.
> > >
> > > Lance
> > >
> > > On 8/15/05, Allen Gilliland <[EMAIL PROTECTED]> wrote:
> > >
> > > > I also had a side thought about the decorator template.  Currently I am 
> > > > still not a fan of the decorator template mainly because it either has 
> > > > to be applied to all page templates or none of them.  This seems 
> > > > inconvenient to me.  I think it would be preferable if you could apply 
> > > > the decorator to only selected page templates.  This would allow users 
> > > > the convenience of using the decorator without requiring that it be 
> > > > used for *all* templates.
> > > >
> > > > I think the best example in this case is a css page template.  I would 
> > > > consider using the decorator template, except that I have a css 
> > > > template as well and if I use the decorator then my css template won't 
> > > > work.
> > 
> >

Reply via email to