Go to page content

Upgrading to Zotonic 0.9

If you're upgrading to 0.9 from an older release, keep the following in mind.


The Erlang modules formerly known as "Webmachine Resource" (resources/resource_*.erl) have been renamed to controllers. They live in the controllers/ folder in a module. This was done to eliminate the confusion between webmachine resources and the Zotonic datamodel.

This means that you have to update your dispatch rules which use the resource_* controllers. Each dispatch rule which uses one of the resource_* controllers, needs to be changed from this:

 {article,      ["article", id, slug],      resource_page,      [ {template, "article.tpl"} ]},

to this:

 {article,      ["article", id, slug],      controller_page,      [ {template, "article.tpl"} ]},

et cetera.

Also, when you wrote your own controllers, you need to rename your resource_ module to use the controller prefix , and make sure it uses the new include file names. The following include files have been renamed:

Old filenameNew filename


This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.