[dev] interesting article on templates

Chuck Hagenbuch chuck at horde.org
Thu Sep 18 07:19:00 PDT 2003


Quoting Nuno Loureiro <nuno at co.sapo.pt>:

> It's difficult to change the design, if you have to change plenty of
> different files.

It's also difficult to change things if you have this much code for every link
on a page:

> <a href="<tag:mitem_folders.url
> />"  onmouseout="window.status='';"
> onmouseover="window.status='<tag:mitem_folders.text />'; return
> true;" class="menuitem" accesskey="<tag:mitem_folders.accesskey />"
> target="<tag:mitem_folders.target />"><tag:mitem_folders.button
> /></a>

Think about how many links we have on some pages, even ignoring stuff that's
looped.

> Take as an example an horde page like mailbox.php. You have HTML output on
> several locations, like the menu stuff (lib/Menu.php), the notification stuff
> (lib/Notification/Listener/status.php), the quota stuff (imp/lib/Quota),

Nuno, no one is arguing with you that the above things should be separated and
made more customizeable.

> and each one of the current template files. There are more problems
> about this that I told you previously, like you can't give this to a
> designer to change the layout (because he has to know PHP and search the
> code for HTML output), and you can't have 2 different sites using the
> same base (framework+core).

In theory you are entirely right here. I have a little bit of trouble with this,
though, because the examples you're giving are pretty small bits of HTML, and
are almost *entirely* customizable through CSS.

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
Born right the first time.


More information about the dev mailing list