How to render template in behavior file?

Hello everybody.

I have one question. I want to render template from behavior file. For
example:

class CarObserverBehavior < Behavior::Base

register “Car Observer”

def render_page
render :template => ‘mytemplates/gootemplate’
end

def cache_page?
false
end
end

Of course this code will be executed with an error. Somebody knows
alternative for " render :template => ‘mytemplates/gootemplate’ "
code? It is possible?


Best wishes, Alexander Lomakin.

Alexander Lomakin wrote:

Of course this code will be executed with an error. Somebody knows
alternative for " render :template => ‘mytemplates/gootemplate’ "
code? It is possible?

It’s not presently possible. Why would you consider this behavior
desirable?


John L.
http://wiseheartdesign.com

John W. Long wrote:

Alexander Lomakin wrote:

Of course this code will be executed with an error. Somebody knows
alternative for " render :template => ‘mytemplates/gootemplate’ "
code? It is possible?

It’s not presently possible. Why would you consider this behavior
desirable?

It looks like he wants to use a Layout from a file instead of using one
of the Layouts defined in the database. (via radiant admin)

This would allow you yo use a text editor while your messing with a
layout instead of working within the textarea radiant provides. It
should be possible with a little bit of hackery…

Am I right about what you are trying to do Alexander?