Jim Gay wrote:
It works just like the 'add' method. I have this in the Help extension:
Radiant::AdminUI::RegionSet.class_eval do
      def replace(region=nil, partial=nil)
raise ArgumentError, "You must specify a region and a partial" unless region and partial
So you can just do

admin.page.edit.replace :the_part, 'my_part'

The only documentation is where I implemented it

Although, now that I look at it, I realize that this is pointless because you can just create a partial of the same name and Radiant will pick it up. So just create a partial in your extension in 'app/views/admin/page/edit_layout_and_type' and It will be picked up instead of the default.

Sorry for the long-winded response.
Yes, or since regions are just arrays on the admin object, you can remove the offending one and replace it with your own. These two lines do that in the concurrent_draft extension (where view is one of page, snippet, or layout):

     admin.send(view).edit.form_bottom.delete 'edit_buttons'
     admin.send(view).edit.add :form_bottom, 'admin/edit_buttons'

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