So I needed something similar to the old DefaultPageParts extension
(which seems to be defunct), but I wanted to be able to define the
default page parts in a parent page that might already have another
page type, like Archive.
The following seems like a really bad idea to me:
alias :original_parent_equals :parent=
default_parts.each do |name|
self.parts << PagePart.new(:name => name, :filter_id =>
Obviously this is really tightly coupled to Radiant internals. It
specifically depends upon how PageController assigns the parent page
when creating a new page, for example.
But it does work, so I'm using it for now. Anybody have any
recommendations for another approach? I put it into an extension
that's available on GitHub. I'm happy to accept patches.
Radiant mailing list