README.md in inverter-0.4.5 vs README.md in inverter-0.4.6
- old
+ new
@@ -20,14 +20,14 @@
# folders which templates are editable
config.template_folders = %w( pages )
# templates from template_folders the are not editable
- config.excluded_template_names = %w( pages/home )
+ config.excluded_templates = %w( pages/home )
# disable Inverter middleware
- config.disabled_middleware = false
+ config.disable_middleware = false
end
```
Configure model that stores template content, e.g. ```models/page.rb```:
@@ -125,31 +125,35 @@
```coffeescript
#= require inverter
pagesConfig = ->
- itemTitleField: 'list_item_title'
- disableNewItems: true
- disableDelete: true
- arrayStore: new RailsArrayStore({
- resource: 'page'
- path: '/admin/pages'
- })
- formSchema:
- version: { type: 'inverter-version', path: '/admin/pages' }
- _page_title: { type: 'string', label: 'Title' }
- _page_description: { type: 'text', label: 'Description' }
- _page_keywords: { type: 'text', label: 'Keywords' }
- _page_image_url: { type: 'string', label: 'Image URL' }
- _blocks: { type: 'inverter' }
+ config =
+ disableNewItems: true
+ disableDelete: true
+
+ arrayStore: new RailsArrayStore({
+ resource: 'page'
+ path: '/admin/pages'
+ })
+
+ formSchema:
+ version: { type: 'inverter-version', path: '/admin/pages' }
+ _meta_title: { type: 'string', label: 'Title' }
+ _meta_description: { type: 'text', label: 'Description' }
+ _meta_keywords: { type: 'text', label: 'Keywords' }
+ _opengraph_image_url: { type: 'string', label: 'Image URL' }
+ _blocks: { type: 'inverter' }
+
+ return config
```
Inverer ```version``` input allows to select previous version of the page to edit.
Inverter input has an option ```defaultInputType``` that specifies what input type should be used as default, if nothing specified ```text``` is used. This might be set to WYSIWYG editor of your choice, e.g:
```coffeescript
-blocks: { type: 'inverter', defaultInputType: 'redactor' }
+_blocks: { type: 'inverter', defaultInputType: 'redactor' }
```
You can also specify input type that you want to use for specific block like this: ```<!--[ Main Body : text ]-->``` — in this case ```Main Body``` would be a label and ```text``` is an input type that will be used to edit this block in CMS.
Include inverter styles for cms inputs into character styles configuration file ```admin.scss```