Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (25 sloc) 1.08 KB
# Uncomment this if you reference any of your controllers in activate
require_dependency 'application_controller'
class StereotypeExtension < Radiant::Extension
version "1.0"
description "Define templates for Pages' children in Radiant CMS."
url "http://blog.aissac.ro/radiant/stereotype-extension/"
# define_routes do |map|
# map.namespace :admin, :member => { :remove => :get } do |admin|
# admin.resources :stereotype
# end
# end
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 :parts_bottom, "admin/stereotype", :after => "edit_layout_and_type"
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
# admin.tabs.remove "Stereotype"
end
end
Jump to Line
Something went wrong with that request. Please try again.