Hopefully someone can help me with this:

I am developing a visitor extension with signup, login, logout using  
restful_authentication plugin and the shared_layout extension to use  
radiant layout with my own controllers. This works all fine.

Now I need a radiant tag rendering 'login, signup' if the visitor is  
not logged in and 'logout' if the visitor is logged in.

The problem is that I do not have access to the session in the tag  
helper... For normal radiant pages I use this in my visitor_extension.rb

def activate
   Page.class_eval do
     attr_accessor :visitor_logged_in
   SiteController.class_eval do
     include AuthenticatedSystem # for visitor authentication
     after_filter :store_location # for 'redirect_back_or_default'  
     def show_page
       ...some code before
       @page.visitor_logged_in = visitor_logged_in?
       ...some code after

Now I can access page.visitor_logged_in in the tag helper - but not  
for my own controllers.

Is there a way to get the session data in the tag helper? If not: how  
can I add this to the shared_layout extension?

I am using no cache ;-) And donĀ“t want to use JavaScript!

Thanks a lot
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to