[dev] Re: [cvs] commit: horde/docs CHANGES framework/Template Template.php

Chuck Hagenbuch chuck at horde.org
Wed Mar 23 20:14:41 PST 2005


Quoting "Jason M. Felice" <jfelice at cronosys.com>:

> I was answering the bounty put up by Chuck, so he'd have to answer what
> he was thinking.  One of our clients has requested the ability to put a
> search block in any template (for other apps, too), inline with their
> static HTML.  So perhaps my approach was informed by that.

That is the idea - blocks are great, but right now it's a pain to use 
them. Being able to easily insert them into any part of the Horde 
layout - which we'll hopefully build more of with Horde_Template - 
would be a killer feature.

Also, how useful *is* Horde_Template outside of Horde? There are lots 
of other template engines. Only particular reason to use ours is that 
it's Horde ...

> More generally, I'd enjoy seeing the functionality consistent and
> available to all applications instead of what I imagine happening, which
> is that we copy and paste the code to render blocks to each page that
> needs it as we encounter the need.  I do hear your concern, and wonder
> if there is another way.

A good point - look at reminders in Kronolith and Nag. As things are 
now we'd have to copy the reminders code from Kronolith into Nag and 
then we'll have two copies of it.

> What about some sort of plugin mechanism?  Perhaps coupled with a
> <plugin:foo /> tag which will load Horde/Template/foo.php.  We could
> then put the Horde/Template/block.php in the framework/Block package.

Not sure that this gets you much instead of an option - would be nice 
if there were a lot of other things to put in plugins, maybe, but 
Horde_Template is relatively complete for our needs. Oh, you mean the 
template content itself being able to trigger it. Then you have 
problems with restricting the functionality - some places probably 
shouldn't include blocks...

-chuck

-- 
"But she goes not abroad in search of monsters to destroy." - John 
Quincy Adams


More information about the dev mailing list