Forum: Radiant CMS ERB in layouts snippets or pages

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bd4c152cdbb373a32ee24d0990cb52d2?d=identicon&s=25 Steven Line (sline)
on 2008-11-02 17:55
What do you expert Radiant + Rails app developers do to display embedded
ruby in your layouts, snippets, or pages?

I'm using the rails_support extension and want to display some program
variables in my layout, like the logged in user and his role.

Thanks!
Steve
8802b1fa1b53e2197beea9454244f847?d=identicon&s=25 Sean Cribbs (seancribbs)
on 2008-11-02 20:05
(Received via mailing list)
I don't care for it, but there is the "backdoor" extension which allows
ERb inside Radiant pages.  Most often I find the seeming need for ERb
represents one or more of these situations:

1) The user isn't familiar enough existing tags or with manipulating the
content structure.
2) A few new tags could fulfill the need very easily.
3) What is really wanted is a custom controller that has its own logic
and views.

For example, you could wrap the "process_page" method in SiteController
so that it assigns the current_user onto the page that is being
rendered, then access that variable from some Radius tags.

Sean
3e89ab6f365f8ba48c4e1c076d43a069?d=identicon&s=25 Jeff Poulton (Guest)
on 2008-11-03 23:09
(Received via mailing list)
I have no idea why I found the following post **after** I posted this
reply.
Looks like this should do the trick.
http://lists.radiantcms.org/pipermail/radiant/2008...
This topic is locked and can not be replied to.