Hi Vincent,
I ran into this just the other day myself and I've done some digging.
In theory you could override a method in SiteController and use it to
pass the current user to @page after find_page() happens.. You would
have to disable the cache in that case and make sure the page is
rendered for each user.
Or, you can use javascript to grab the user info from the controller.
As for tags, you can create a tag that can output the necessary
javascript. Then the problem is how to make it degrade gracefully...
Personally, I don't want to disable the cache... but that will mean
that I won't be able to display the logged-in status for people
without javascript.
-C
On 26-Aug-08, at 5:06 AM, Vincent Pérès wrote:
Hello,
I would like to create something like that :
http://lists.radiantcms.org/pipermail/radiant/2006-September/001695.html
The goal is to display a 'login box' if the current user is not
connected, else an 'account box'.
But I can't access to the 'session'. I tried to enable the session
like
that :
module CoreExtension::SiteControllerExtensions
def self.included(base)
base.class_eval do
session :disabled => false
end
end
end
(and include this file to SiteController)
It doesn't work. I found an other discution about :
http://lists.radiantcms.org/pipermail/radiant/2007-November/
007146.html
But ir doesn't work too... can you explain me, what is the best way to
do my feature?
Thank you !
Vincent
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant