On Tue, 2011-03-29 at 10:09 +0200, Malthe Borch wrote:
> > <p metal:use-macro="templates['header.pt'].macros['header']" />
> >
> > [snip]
> >
> > Is there any shorter way to do this? Can the template loader be passed
> > implicitly?
> It would easy to include a load function or even expression, i.e.
> "load: ../header.pt", but as that example illustrates, it would be
> relative to where the template itself is located.
> We could include something like that. Anyone else with an opinion on this?

If the loader is off by default (meaning no magic name injected into
expression contexts by default) and the loader implementation is
pluggable, I'm +1.  If it's not off by default and not pluggable, I'd be
-1.  Rationale: it'll be hard to explain if it's on by default and uses
a Chameleon-internal loader implementation, when the rest of the system
(e.g. Pyramid/Plone) uses its own loading system.

> > 2) Repeat and macro expansion don't seem to respect indentation levels.
> > Are there any options for pretty formatting of html output? I guess I'll
> > have to parse then reformat in a separate phase?
> Repeat clauses should have indentation, computed as the whitespace on
> the line of element definition.
> The macro implementation does not take indentation into account. That
> might be a bug. I don't know the performance impact of having to go
> through the items in the output queue and add the indentation to each.
> Might not be bad.
> > 3) Can we have >1 template per file?
> You want to have them "named" somehow then? What sort of syntax are
> you thinking about it?
> \malthe
> _______________________________________________
> Repoze-dev mailing list
> Repoze-dev@lists.repoze.org
> http://lists.repoze.org/listinfo/repoze-dev

Repoze-dev mailing list

Reply via email to