Using the code for the training

You can get the complete code for this training in https://github.com/collective/ploneconf.site

The code-package

The package

Note

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

cd src
git clone https://github.com/collective/ploneconf.site.git

Getting the code for a certain chapter

To use the code for a certain chapter you need to checkout the appropriate tag for the chapter. The package will then contain the complete code for that chapter (excluding exercises). If you want to add the code for the chapter yourself you have to checkout the tag for the previous chapter.

Here is a example:

git checkout views_2

The names of the tags are the same as the url of the chapter. So the tag for the chapter https://training.plone.org/5/mastering_plone/registry.html is registry and you can get it with git checkout registry.

Moving from chapter to chapter

To change the code to the state of the next chapter simply checkout the tag for the next chapter:

git checkout views_3

If you made any changes to the code you have to get them out of the way first:

git stash

This will stash away your changes but not delete them. You can get them back later. You should learn about the command git stash before you try reapply stashed changes.

If you want to remove any changes you made locally you can delete them with this command:

git reset --hard HEAD

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 add-ons
    ploneconf.site
#    starzel.votable_behavior

...

[sources]
ploneconf.site = git https://github.com/collective/ploneconf.site.git

These are the tags for which there is code:

Chapter Tag-Name
About Mastering Plone  
Introduction  
Installation & Setup  
The Case Study  
The Features of Plone  
The Anatomy of Plone  
What’s New in Plone 5  
Configuring and Customizing Plone “Through The Web”  
Theming  
Extending Plone  
Extend Plone With Add-On Packages  
Dexterity I: “Through The Web”  
Buildout I buildout_1
Write Your Own Add-Ons to Customize Plone eggs1
Return to Dexterity: Moving contenttypes into Code export_code
Views I views_1
Page Templates zpt
Customizing Existing Templates zpt_2
Views II: A Default View for “Talk” views_2
Views III: A Talk List views_3
Testing in Plone testing
Behaviors behaviors_1
Writing Viewlets viewlets_1
Programming Plone  
IDEs and Editors  
Dexterity Types II: Growing Up dexterity_2
Custom Search  
Turning Talks into Events events
User Generated Content user_generated_content
Resources resources
Using Third-Party Behaviors thirdparty_behaviors
Dexterity Types III: Python dexterity_3
Relations relations
Manage Settings with Registry, Controlpanels and Vocabularies registry
Creating a Dynamic Front Page frontpage
Creating Reusable Packages  
More Complex Behaviors  
A Viewlet for the Votable Behavior  
Making Our Package Reusable  
Using starzel.votable_behavior in ploneconf.site  
Releasing Your Code  
Buildout II: Getting Ready for Deployment