Difference between revisions of "Plone"

From mn/geo/geoit
Jump to: navigation, search
(Created page with "=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 Plo...")
 
(Adding javascript)
Line 49: Line 49:
  
 
[http://plone.org/documentation/manual/plone-community-developer-documentation/templates-css-and-javascripts/javascript | javasscript]
 
[http://plone.org/documentation/manual/plone-community-developer-documentation/templates-css-and-javascripts/javascript | 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:
 +
<pre>
 +
<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>
 +
</pre>

Revision as of 11:00, 29 September 2011

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>