[Nitro] Nitro and Amrita

George Moschovitis george.moschovitis at gmail.com
Mon Apr 17 02:25:51 EDT 2006


nitro's templates are .xhtml (that is why they use the extension
.xhtml) You can use optional xml namespace for if/for to make it xhtml
compliant, this was a quick example.

-g.

On 4/16/06, David Corbin <dcorbin at machturtle.com> wrote:
> On Sunday 16 April 2006 01:14 pm, George Moschovitis wrote:
> > > I wouldn't neccessarily say that b/c Amrita is different from Nitro's
> > > templates. Nitro's templates are more like PHPs, while Amrita
> > > completely separates layout from data.
> >
> > NOT really. Nitro Templates can be used in PHP like mode and/or Amrita
> > style mode. Have a look at this.
> >
> >
> > def action
> >   @user = User.current_user
> >   @name = @user.name
> >   @articles = @user.articles
> >   @something =...
> > end
> >
> > action.xhtml
> >
> > <div if="@user.admin">
> >   <p>#@name</p>
> >   <ul for="a in @articles">
> >      <li>#{a.title}</li>
> >   <
> > </div>
> >
> > This is fully separated layout from data.
>
> I'm a touch out of date with Amrita, but I think it also has the benfit that
> the template is valid X?HTML.  Your example is not.  This can be very handy
> you have to work with "designers", or some 'tool' that requires X?HTML.
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>


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




More information about the Nitro-general mailing list