I'm looking for a template library that will allow me to define text
templates (mostly html, at least initially) with embedded Ruby calls, with
some specific needs / preferences:
- Be valid (x)html even with the embedded Ruby
- Allow selected Ruby calls in the template to return full (nested) html
structures (perhaps by that call itself dynamically using another template)
Any Suggestions? A search on RAA listed lots of candidates and I'm not sure
where to start.
I'm looking for a template library that will allow me to define text
templates (mostly html, at least initially) with embedded Ruby calls, with
some specific needs / preferences:
erb is the accepted way to do this.
Frankly, though, I'm of the group that thinks code and templates should
not mix. (It's why I joined PageTemplate - I liked it so much, I took up
the project)
- Be valid (x)html even with the embedded Ruby
Technically, you can *probably* do this with any templating system. How?
Just use comments.
<!--
<% ruby code here %>
-->
I still stand by my statement that code doesn't belong in templates :D.
(And for the record: you can use either the comment-style above, or
HTML::Template syntax in PageTemplate)
- Allow selected Ruby calls in the template to return full (nested) html
structures (perhaps by that call itself dynamically using another template)
Most systems should have an include command.
···
On Sat, Sep 03, 2005 at 01:36:25AM +0900, itsme213 wrote:
Any Suggestions? A search on RAA listed lots of candidates and I'm not sure
where to start.
amrita supports all of this and also separates code from template - the
templates are actually totally valid html. i've used it for years and love
it.
cheers.
-a
···
On Sat, 3 Sep 2005, itsme213 wrote:
I'm looking for a template library that will allow me to define text
templates (mostly html, at least initially) with embedded Ruby calls, with
some specific needs / preferences:
- Be valid (x)html even with the embedded Ruby
- Allow selected Ruby calls in the template to return full (nested) html
structures (perhaps by that call itself dynamically using another template)
Any Suggestions? A search on RAA listed lots of candidates and I'm not sure
where to start.
Thanks.
--
email :: ara [dot] t [dot] howard [at] noaa [dot] gov
phone :: 303.497.6469
Your life dwells amoung the causes of death
Like a lamp standing in a strong breeze. --Nagarjuna