How to use session variable in extension

View: New views
2 Messages — Rating Filter:   Alert me  

How to use session variable in extension

by Martin-319 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi


  i want to add some option if the current user is admin , unless that
option will disabled


 can any one have idea about this






--~--~---------~--~----~------------~-------~--~----~
Radiant CMS Dev Mailing List
Post:        radiantcms-dev@...
Unsubscribe: radiantcms-dev-unsubscribe@...
Group Site:  http://groups.google.com/group/radiantcms-dev/
-~----------~----~----~----~------~----~------~--~---


Re: How to use session variable in extension

by wolfram@rubyfocus.biz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Generally speaking, from what I've learned by experimentation & discovery with Radiant, the recommended route is:

1. Make an extension
2. In the activate method, either add a tab or override specific view partials
3. Add a controller that handles your custom actions, or if it's a matter of disabling existing actions (e.g. the Add Child link), then include an "only_allow_access" directive in the Pages Controller. The latter can also be done from the activate method by re-opening the class, the standard Ruby way.

There are good examples and tutorials on the wiki for all of these steps. I recommend you start there.

-Wolf


-- Sent from my Palm Prē


Martin wrote:


Hi


i want to add some option if the current user is admin , unless that
option will disabled


can any one have idea about this









--~--~---------~--~----~------------~-------~--~----~
Radiant CMS Dev Mailing List
Post:        radiantcms-dev@...
Unsubscribe: radiantcms-dev-unsubscribe@...
Group Site:  http://groups.google.com/group/radiantcms-dev/

-~----------~----~----~----~------~----~------~--~---