Plone

From mn/geo/geoit
Revision as of 09:27, 4 October 2011 by Jfb (talk | contribs) (Adding javascript)

Jump to: navigation, search

Installation

Plone is easy to install, the latest version we are working with is Plone 4.1.

This page is primarily being used for keeping notes on the migration task from Plone 2.5 to Plone 4.1.

Jfb 10:58, 29 September 2011 (CEST)

Working Through Aspeli Book

Followed the main recipes provided for the example 'Optilux' site. The key things done so far include:

  1. Creating a custom theme from an example
  2. Creating a custom BrowserView (or is it a product, I'm not sure)
  3. Adding JavaScript to templates

Creating a custom theme

  1. copy over the example template them
  2. replace all instances of the previous them title or name
  3. run:
bin/zopeskel plone myproject.theme

Now, copy over all the components from the original theme into that directory:

-- configure.zcml --


Creating a BrowserView Product

TBC

Adding javascript

There are some key pieces of information for this here: | community-developer-documentation

and

| client-side-functionality


Looking closely at:

| jquery

| javasscript

However, there are some key pieces of information missing. Most notably, any scripts requiring an 'onload' command need to include this piece of information at the top of the template:

<metal:javascriptslot fill-slot="javascript_head_slot">
  
          <script type="text/javascript" src="++resource++transport.fpi.static/DynamicOptionList.js"></script>
          <script type="text/javascript">
          jQuery(document).ready(function()
          {

           <!-- inside here include 'onload' requirements -->
                  j$ = jQuery.noConflict();
  
                  initDynamicOptionLists();
          });
  
          </script>
  </metal:javascriptslot>

Just some personal notekeeping:

  1. installed Plone using the Aspeli guidelines and a simple buildout.
  2. I Created (or used the optilux example) policy package that actually requires Plone. This seems to simplify things, so that it is not actually 'Plone' that I will install to the server, but my own bin/buildout policy package.
  3. I created a new theme for the transport site using the optilux template as an example. I need to go back above and flush out how this is accomplished exactly, but it mostly was done by copying the optilux.theme and replacing any instance of optilux with 'transport'. However, I also had to make some configuration changes in the confifgure.zcml, instances.py module, and test.py module (maybe a few others too).
  4. created a new BrowserView product. This is going to replace the fpi cgi stuff I had before, or at least the front end. I imagine for now the CGI aspect may still be used, but we'll see. I guess the next step is figuring out how to render forms, etc. I will probably have to work with PloneFormGen.