README
CMS editors for Noosfero
========================
This directory contains code for custom content editors in Noosfero.
Creating a new editor
=====================
:: File structure
Let's say that you are implementingn and editor for type, say, "foo/bar". Then
you have to create:
* app/controllers/my_profile/cms/foo_bar.html
* app/views/cms/foo_bar_*.rhtml (one view for each action you define in the
controller class, if applicable).
:: Coding conventions
You file must add methods to CmsController class. They are going to be loaded
after the cms_controller.rb file itself, to you don't need to care about
declaring the superclass:
class CmsController
def foo_bar_edit
# code for preparing the "edit" view
end
def foo_bar_new
# code for preparing the "new" view
end
# etc ...
end
Note that *all* of your actions must be prefixed with the content type (e.g.
"foor_bar_" for "foo/bar"), in order to avoid conflicts.
The views for those actions can be thrown in app/views/cms/, just like other
views for this controller.
Limitations
===========