I’ve successfully set up my application to use the shared_layout
extension. This really is great because previously we had two Rails
applications: the radiant one for static content and the rails one for
dynamic content. However they both had to appear as one on the site,
and so there was a lot of duplication of layout.
So right now my Radiant app has two extensions:
/vendor/extensions/shared_layout
/vendor/extensions/dynamic
With the ‘dynamic’ one being my old Rails app. Everything has worked
great so far, but I am now trying to write a custom tag but am having
trouble getting to the session object.
Now I’ve already turned on sessions for Radiant using:
def activate
Page.send :include, UserStatusTags
SiteController.class_eval { session :on }
end
in my extension config file. And I actually can get to the session
object when the tag is processed through Radiant controllers by
accessing the tag.globals.page.request attribute.
However when the same tag is processed through one of my controllers,
the request object isn’t even present. Any ideas how to solve this?