Andrew Gehring wrote:
I would be happy to write it, if I felt like I could. However, I don't
have enough knowledge in this area to write a comprehensive document,
and was hoping somebody was /has...
Not sure if this helps, but what I had copied out towards the start of
that article was collected by looking at the source code for the Radiant
Settings extension that adds a tab in the Admin area.
There are 2 things that you can refer to:
[1] The original tutorial about creating a blog roll -
http://wiki.radiantcms.org/Creating_Radiant_Extensions
From this one, you can see the main things you need to -
There are two remaining steps in order to get our LinkController to
show up in the admin interface. First, we need to setup the routes
definitions for the controller and second we need to add the
associated tab to the admin interface.
To do this, open up the main extension file again
(“vendor/extensions/link_roll/link_roll_extension.rb”). Change the
define_routes block so that it looks like this ...
[2] Look at the source for some extension that creates a tab in the
admin area. Some of the stuff below is from the settings Extension URL:
"http://githib.com/Squeegy/radiant-settings"
I'm sorry for lifting and pasting this code from the
settings_extension.rb file in the vendor/extensions/settingds directory:
#this creates routes so that your controller in the admin space is
connected in!
define_routes do |map|
map.namespace 'admin' do |admin|
admin.resources :settings
end
end
#This is the main thing that adds a tab to the admin area when your
extension is activated/ started
def activate
Radiant::Config.extend ConfigFindAllAsTree
admin.tabs.add "Settings", "/admin/settings", :after => "Layouts" #,
:visibility => [:developer]
Page.class_eval {
include SettingsTags
}
end
#To undo the effect, just remove it when deactivated.
def deactivate
admin.tabs.remove "Settings"
end
Hopefully, this helps you get started. However, I do not know how to do
some of the fancy things that Shards lets you do - like modify only a
part of the UI or something. I don't know (yet) how copy/move adds icons
to each row of the page list - I guess I could look at the source, just
haven't yet.
Cheers
Mohit.
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant