[Nitro] Nitro templating question

George Moschovitis george.moschovitis at gmail.com
Sat Jan 7 06:06:40 EST 2006


> What I've found in skin.rb is a bunch of disconnected HTML embedded as
> raw strings in Ruby code.  For anything but the most trivial page layout
> that is a nightmare to design and maintain.


Really?

I think rails layout system is only usefull for small, silly
applications. Like many original rails features this seems tailored to
37signals simplistic applications, this is not a general solution. I
find Nitro's elements or xslt compilers to be much more intuitive,
elegant and powerful. I mean:

<Page>
  ..
</Page>


and


class Nitro::Element
  class Page
     def render
        %~
<html>
   <head>
   </head>
   <body>
    ...
    ...
    #{content}
    ...
    #{content :sidebar} <!-- renders content from sidebar -->
   ...
</html>
        ~
     end
end

is quite easy to do. I can easily add external template file support
for elements to make this better for you (ie keep th render xhtml in a
separate .xhtml file). Any other ideas?

regards,
George.

--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com




More information about the Nitro-general mailing list