Trying to treat Radiant like Rails

Radius provides a way to turn an object’s methods into tags:

http://radius.rubyforge.org/files/QUICKSTART.html
(near “Exposing Objects to Templates”)

This seems like it would be a useful way to get at the properties of
Active Record objects from with Radiant (for writers of extensions,
for example.)

However, the Radiant::Taggable module does not seem to pull in the
necessary define_tag() method necessary (of Radiant::Context) to do
this.

Any suggestions for the Radiant way of making tags out of the
properties of an object? I think i will be able to do it one-by-one,
method by method, making a tag for each desired method. This is
probably a bit beyond the scope of Radiant, but I’d thought i’d ask.

Along these lines, has this been done before: When writing
models/views/controllers for an extension, is it possible to have a
controller’s action (result) embed itself within the context of a
radiant page? This would be the best of the rails and radiant
world!

I think the problem is I’m trying to use Radiant like a rails app.
I’m trying to squeeze out that last 20%, since i love the first 80%.

Thanks

Mark Meves wrote:

necessary define_tag() method necessary (of Radiant::Context) to do
this.

You could use:

PageContext.class_eval do
define_tag …
end

Kind of a hack, but it would work.


John L.
http://wiseheartdesign.com