Using the code for the training

We provide the code for this training divided in into chapters.

The code-package

The package containing the eggs for each chapter is already automatically downloaded by buildout into a directory called src/ploneconf.site_sneak/.

Nota

If you want to do it by hand do the following:

$ cd src
$ git clone https://github.com/collective/ploneconf.site_sneak.git
$ git checkout plone5

Copy the relevant chapter so that Plone can use into

To use the code for a certain chapter stop Plone and do this:

$ cp -R src/ploneconf.site_sneak/chapters/<number_and_name_of_chapter>/ src/ploneconf.site
$ ./bin/buildout
$ ./bin/instance fg

This will:

  • replace any existing previous chapter with the one you want to copy
  • run buildout and restart Plone

Telling Plone about ploneconf.site

If you did not yet do this (it is covered in chapter Write Your Own Add-Ons to Customize Plone) you will have to modify buildout.cfg to have Plone expect the egg ploneconf.site to be in src.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
eggs =

...

# our addons
    ploneconf.site
#    starzel.votable_behavior

...

[sources]
ploneconf.site = fs ploneconf.site full-path=${buildout:directory}/src/ploneconf.site

These are the names of the folders for which there is code. The same folder with the code for Plone 5 are appended with ‘_p5’:

01_eggs1
02_export_code
03_zpt
04_zpt_2
05_views_2
06_views_3
07_behaviors_1
08_viewlets_1
09_dexterity_2
10_events
11_user_generated_content
12_resources
13_dexterity_3
14_embed