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 :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.

On Sep 8, 2008, at 7:46 AM, Vincent Pérès wrote:

Hello Jim,

I had already use shards to inject and extend functionnalities to pages,
it's not a problem.
Here, I would like to remove or replace an 'existing' part : layout
list, to replace it by my list for example.

I didn't see we can 'replace' a part, thank you.
Do you have any documentation about the replace method?
What does it looks like?

Thank you !
Radiant mailing list

Reply via email to