[Nitro] Nitro and Amrita

George Moschovitis george.moschovitis at gmail.com
Sun Apr 16 13:14:33 EDT 2006


> 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>
  </ul>
</div>

This is fully separated layout from data.


George.


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




More information about the Nitro-general mailing list