[Radiant] Sitecontroller instance variable in custom tag
Dave Bryand
dave at equals25.com
Thu Dec 13 10:37:37 CST 2007
Hi,
I'm trying to figure out how to access the value of an instance variable
that gets setup on SiteController when my extension is activated. I'd
like to use this value in a tag, but I can' figure out how to access
that variable from the tag.
If I setup a tag that just dumps the page.inspect, like the tag below, I
can see the instance variable in the output, but I just can't figure out
how to grab it.
----------------
tag 'inspect_page' do |tag|
tag.globals.page.inspect
end
----------------
I'd like to be able to do something like
----------------
tag 'my_instance_variable' do |tag|
# @my_instance_variable is defined in SiteController on extension
activation
tag.globals.page.my_instance_variable
end
----------------
Anyone know how to do this?
Thanks!
--
Posted via http://www.ruby-forum.com/.
More information about the Radiant
mailing list