[Nitro] Views and Templating

Peter Abrahamsen rainhead at gmail.com
Thu Sep 8 20:02:36 EDT 2005

> You can do that. In fact even the scaffold system injects methods like
> to_href or to_link into managed objects. You can add a custom
> to_summary method if you want. There is also support for forms:
> #{form_for obj}

Ok, I guess I didn't find those. I guess I should scaffold my objects  
even if I'm not going to use most of the auto-generated interfaces.

> If i understand this correctly, you propose something like the layout
> system of Rails.

I don't know; I haven't played with Rails very much. I'm just looking  
for a common-sense way to let some of my templates span across  

> Even though I don't think this system is flexible enough for many
> common cases (at least for several of my projects it is unusable) I
> plan to add this functionality (it is useful for the scaffolder for
> example). Of course I would prefer to receive a patch for this ;-)

What system, exactly, do you mean?

> I have no much experience with Zope. Can you provide some better  
> examples?

There are some docs here:


where METAL is probably the most relevant part. You could also try  
installing Plone quickly and looking at the page templates it keeps  
on the filesystem. Looking over it, I'm not sure how much METAL,  
specifically, offers over XSL, but I'm not interested in promoting  
either of those technologies. I just want some way to incorporate  
something like aspects into my page templates--that is, code and  
other templates can replace, prepend or append (inside or outside a  
container), parts of other templates. I can picture ways of doing  
this through controllers, but that seems inappropriate.

I'll be out of town for a week and a half, for anyone who responds to  
this message.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20050908/62ca8d0e/attachment.html 

More information about the Nitro-general mailing list