diff --git a/README.md b/README.md index c2a48f9..0294063 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ To add stereotypes you need to add fields to the Radiant::Config table. There ar 1.) Page Parts (and filters) -The key has to look like: `stereotype..parts` and the value `body:markdown,sidebar:textile`. +The key has to look like: `stereotype..parts` and the value `body:Markdown,sidebar:Textile`. 2.) Layout diff --git a/lib/stereotype/page_extensions.rb b/lib/stereotype/page_extensions.rb index e569b70..f7ddba0 100644 --- a/lib/stereotype/page_extensions.rb +++ b/lib/stereotype/page_extensions.rb @@ -4,12 +4,20 @@ module PageExtensions def self.included(base) base.extend ClassMethods base.class_eval do - class < { :name => "stereotype", :page_id => page.parent_id}) + custom_field = CustomField.find(:first, :conditions => { :name => "stereotype", :page_id => params['page_id']}) name = custom_field && custom_field.value if name