Actually, unless you need to override whether the page is even visible,
I would override the process_page method instead. But that's just my
In your tags, read the current_front_user off of tag.globals.page.
Radius blocks get passed around and the scope can be wonky sometimes.
Vincent Pérès wrote:
Christopher Dwan wrote:
You have to get SiteController to pass the info into your model,
that's the only way to get the data into a tag AFAIK. So you have to
write an extension for SiteController that adds the function of
passing the current_user's info into your model (e.g. pass in the
user_id). Then you have to either add the ability to receive the
current_user info into Page or into another type of Page like a
Basically I mean something like this... (this code is just for
illustrative purposes and not necessarily the best way to accomplish
Thanks for your answer, I'm understanding what you meant.
I created the follwing site controller extension (which is include in my
core extension) :
# This reenables the session for the SiteController - session
:on does not work!
session :disabled => false
alias_method_chain :find_page, :current_front_user
found = find_page_without_current_front_user(url)
found.current_front_user = current_user
Then, I added the following line in my app/models/page.rb
And finally, this is my extensions tags file :
tag "current_front_user", :for => current_front_user
tag "if_current_front_user" do |tag|
tag "unless_current_front_user" do |tag|
When I try to run the server, I got the following error :
"undefined local variable or method current_front_user for MembersTags"
I think it's a basic ruby error, can you give me the way to access to my
Thank you !
Radiant mailing list