As one of the people involved in pyramid_layout, I unbiasedly agree. :)
pyramid_layout has two ideas: layouts and panels. Panels are re-usable, callable snippets of templating and code. Since it is an extension of the view machinery, it inherits a lot of Pyramid coolness (overriding, for example.)
For example, a sales graph:
@panel_config(name="sales_graph", renderer="path to template")
def sales_graph(request, context, axes, values):
do some stuff and make some data
return dict(data=data)
Then, call it from one of your templates. For example, calling from ZPT:
${panel('sales_graph', axes=these_axes, values=these_values)}
Most templating systems have reuse of templating (macros, etc.) pyramid_layout panels take that three steps further:
- Templating *and* the logic for that template, as a unit
- Callable, with parameters
- Overridable with normal Pyramid machinery
Again, since this uses the pyramid view machinery, it isn't a lot of code and isn't too heavy conceptually.
--Paul