Sep 14, 2012
A simple introduction to Plone development.
About a month ago, there was a bit of a ruckus on twitter about the state of Plone and documentation and what not.
There was a specific request for a Hello World type tutorial introducing Plone development. After talking with Mikko and others on IRC, I put some ideas together and released a first attempt a few days later.
Over the last few weeks, I've put time into adding more sections, reorganizing the layout, and general cleanup. Tonight, I pushed those changes to the developer manual at http://collective-docs.readthedocs.org/en/latest/getstarted/helloworld/index.html
At this point it's starting to take shape. There are holes in it, and things I'd like to clean up, but it's a good start.
I'd like to get some feedback. What do folks think? What is missing? Are there any errors? Really, anything helpful is appreciated.
You can comment here, or reach me @cullerton on twitter.
Jun 22, 2010
Step 2: Create a browser view pointing to the class
In src/my.product/my/product/browser/configure.zcml, I added a browser view pointing to GlobalJS, gave it a name, and added a permission. Note that the name of the file containing GlobalJS is CommonUtils.py
<browser:view for="*" name="global_js.js" class=".CommonUtils.GlobalJS" permission="zope2.View" />
Here, I register the browser view in src/my.product/my/product/profiles/default/jsregistry.xml. I needed access to portal_url before jquery was loaded, so I added the insert-before property. Note that the id is the same as the name registered in the browser view.
Hope this helps someone.