Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: 0.9
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (18 sloc) 0.848 kB
require_dependency 'application_controller'
class StereotypeExtension < Radiant::Extension
version "0.9" # this version is compatible with Radiant 0.9
description "Define templates for Pages' children in Radiant CMS."
url "http://blog.aissac.ro/radiant/stereotype-extension/"
def activate
throw "Custom Fields Extension must be loaded before Stereotype Extension" unless defined?(CustomFieldsExtension)
Page.send :include, Stereotype::PageExtensions
Admin::PagesController.class_eval do
include Stereotype::PagesControllerExtensions
end
admin.page.edit.add :layout_row, "admin/stereotype"
admin.page.index.add :sitemap_head, 'admin/stereotype_th', :after => "remove_child_column"
admin.page.index.add :node, 'admin/stereotype_td', :after => "remove_child_column"
end
def deactivate
end
end
Jump to Line
Something went wrong with that request. Please try again.