Skip to content

Commit

Permalink
Overhaul Mastering Plone 6 development
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuess committed Oct 7, 2024
1 parent d07b73f commit 66ba1db
Show file tree
Hide file tree
Showing 58 changed files with 2,051 additions and 2,830 deletions.
8 changes: 8 additions & 0 deletions docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,14 @@ mxdev
plonecli
A Plone CLI for creating Plone packages. [plonecli usage](https://github.com/plone/plonecli)
Cookieplone
[Cookieplone](https://github.com/plone/cookieplone) is the method to create a Plone project.
You can use Cookieplone to build a backend add-on, a new Volto add-on, or a full project with both backend and frontend.
Cookieplone simplifies the process using robust Cookiecutter templates from {term}`cookieplone-templates`.
cookieplone-templates
[`cookieplone-templates`](https://github.com/plone/cookieplone-templates) is a collection of templates used by {term}`Cookieplone`.
GenericSetup
[GenericSetup](https://5.docs.plone.org/develop/addons/components/genericsetup.html) is a framework to modify the Plone site during add-on package installation and uninstallation.
It provides XML-based rules to change the configuration settings.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ teaching/index

{ref}`mastering-plone-label`

: `Mastering Plone 6 development training` teaches the best practices of Plone development.
: Best practices of Plone development, backend and frontend.

{ref}`mastering-plone5-label`

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/mastering-plone/_static/dexterity_add_talk_frontend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/mastering-plone/_static/event_view_volto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/mastering-plone/_static/import_steps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/mastering-plone/_static/search_block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/mastering-plone/_static/search_response.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/mastering-plone/_static/searchable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/mastering-plone/_static/volto_component_sponsors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions docs/mastering-plone/add-ons.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
myst:
html_meta:
"description": ""
"property=og:description": ""
"property=og:title": ""
"description": "Extending Plone with features via existing backend add-ons"
"property=og:description": "Extending Plone with features via existing backend add-ons"
"property=og:title": "Extending Plone with add-on packages"
"keywords": "Plone, Volto, add-on, customizing"
---

Expand All @@ -14,7 +14,9 @@ myst:
```{card}
Backend chapter
For frontend add-ons see chapter {ref}`volto-addon-label`
For frontend add-ons see chapter {ref}`volto-addon-label`.
The creation of a custom backend add-on is explained in {doc}`voting-story/index`
```


Expand Down Expand Up @@ -46,8 +48,8 @@ For example an add-on that has the goal to provide a bookmarking feature depends
Have a look at the curated lists of add-ons:


[backend add-ons](https://github.com/collective/awesome-plone/blob/main/README.md)
[frontend add-ons](https://github.com/collective/awesome-volto/blob/main/README.md)
[Awesome Plone – backend add-ons](https://github.com/collective/awesome-plone/blob/main/README.md)
[Awesome Volto – frontend add-ons](https://github.com/collective/awesome-volto/blob/main/README.md)



Expand Down
14 changes: 5 additions & 9 deletions docs/mastering-plone/api.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
---
myst:
html_meta:
"description": ""
"property=og:description": ""
"property=og:title": ""
"keywords": ""
"description": "Utilities for programming with Plone"
"property=og:description": "Utilities for programming with Plone"
"property=og:title": "Programming Plone"
"keywords": "utilities, tools, techniques, programming, API"
---

(api-label)=

# Programming Plone

% TODO Discuss backend development versus frontend development
% TODO Discuss plone.restapi


```{card} Backend chapter
In this part you will:
- Learn about the recommended ways to do something in backend code in Plone.
- Learn to debug
Topics covered:
Tools and techniques covered:
- {py:mod}`plone.api`
- Portal tools
Expand Down
42 changes: 24 additions & 18 deletions docs/mastering-plone/behaviors_1.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
myst:
html_meta:
"description": ""
"property=og:description": ""
"property=og:title": ""
"keywords": ""
"description": "Add features to existing content types"
"property=og:description": "Add features to existing content types"
"property=og:title": "Behaviors"
"keywords": "behavior, Plone, field, feature"
---

(behaviors1-label)=
Expand All @@ -13,29 +13,35 @@ myst:

Enhance content types to be selectable for presentation on the front page.

````{card} Backend chapter
Get the code: https://github.com/collective/ploneconf.site
```shell
git checkout behaviors_1
```
More info in {doc}`code`
````

```{card}
In this part you will:
- Add a field to talks and other content types by using a behavior
- Make the field values available via catalog search
Topics covered:
Tools and techniques covered:
- Behaviors
- Catalog indexes and catalog metadata columns
```

````{card} Backend chapter
Checkout `ploneconf.site` at tag "talks":
```shell
git checkout talks
```
The code at the end of the chapter:
```shell
git checkout behaviors_1
```
More info in {doc}`code`
````

```{only} not presentation
A first approach would be to extend the functionality of a content type by writing an adapter that adapts an object of this type to add an additional attribute or feature.
This would mean to write an adapter for an interface the respective content types provides.
Expand Down Expand Up @@ -163,7 +169,7 @@ The object is equipped by a storage where behaviors do store values with a key u
Furthermore a `marker interface` is needed as soon as we want to register components for objects that do adapt this behavior, e.g. REST API endpoints.
We will see `marker interfaces` and `AnnotationStorages` in chapter {doc}`behaviors_2`.
We will see `marker interfaces` and `AnnotationStorages` in chapter {doc}`./voting-story/behaviors_2`.
```

(behaviors1-adding-label)=
Expand Down Expand Up @@ -293,7 +299,7 @@ To add a metadata column for "featured", we have to add one more line in the `ca
</object>
```

After another restart and another import of the xml-profile, the new metadata column can be found in the `portal_catalog` in your `ZMI` on the tab `Metadata`.
After a restart and reinstallation of the product, the new metadata column can be found in the `portal_catalog` in your `ZMI` on the tab `Metadata`.


(behaviors1-exercise-label)=
Expand Down
46 changes: 22 additions & 24 deletions docs/mastering-plone/code.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
myst:
html_meta:
"description": ""
"property=og:description": ""
"property=og:title": ""
"keywords": ""
"description": "Code of the training – where, what, how to update"
"property=og:description": "Code of the training – where, what, how to update"
"property=og:title": "The code for the training 'Mastering Plone development'"
"keywords": "code, setup, development environment"
---

(code-label)=

# The code for the training

You can get the complete code for this training from GitHub.
- The backend add-on [ploneconf.site](https://github.com/collective/ploneconf.site)
- The frontend Volto app [volto-ploneconf](https://github.com/collective/volto-ploneconf)
See {doc}`installation`.

The backend add-on is included in the backend setup of [Training setup Mastering Plone Development](https://github.com/collective/training_buildout).
See chapter {ref}`installation-install-backend-label`.
The backend add-on [ploneconf.site](https://github.com/collective/ploneconf.site) is included in the backend setup of [Training setup Mastering Plone Development](https://github.com/collective/training_buildout).

The frontend code can be found at [volto-ploneconf](https://github.com/collective/volto-ploneconf).

Further add-ons are build or used while stepping through advanced training chapters.
For the sake of completion we are mentioning them here.
Expand Down Expand Up @@ -85,10 +85,10 @@ This does two things:

## Tags

These are the tags of the backend add-on for which there is code:
These are the tags of the backend add-on 'ploneconf.site' and frontend add-on 'volto-ploneconf' for which there is code:


| Chapter | Tag-Name | Package |
| Chapter | Tag name | Package |
| ------------------------------ | ------------------------ | --- |
| {doc}`about_mastering` | |
| {doc}`intro` | |
Expand All @@ -100,35 +100,33 @@ These are the tags of the backend add-on for which there is code:
| {doc}`add-ons` | |
| {doc}`extending` | |
| {doc}`dexterity` | |
| {doc}`dexterity_2_talk` | |
| {doc}`volto_development` | |
| {doc}`dexterity_2_talk` | talks | ploneconf.site |
| {doc}`dexterity_reference` | |
| {doc}`volto_overrides` | overrides | volto-ploneconf |
| {doc}`volto_talkview` | talkview | volto-ploneconf |
| {doc}`volto_development` |
| {doc}`behaviors_1` | behaviors_1 | ploneconf.site |
| {doc}`volto_frontpage` | frontpage | ploneconf.site |
| {doc}`api` | |
| {doc}`events` | base | ploneconf.site |
| {doc}`events` | event | ploneconf.site and volto-ploneconf |
| {doc}`registry` | vocabularies | ploneconf.site |
| {doc}`custom_search` | |
| {doc}`volto_testing` | |
| {doc}`thirdparty_behaviors` | |
| {doc}`dexterity_3` |
| {doc}`upgrade_steps` |
| {doc}`volto_components_sponsors` | |
| {doc}`custom_search` | search | ploneconf.site |
| {doc}`volto_testing` | testing | volto-ploneconf |
| {doc}`dexterity_3` | schema | ploneconf.site |
| {doc}`upgrade_steps` | upgrade_steps | ploneconf.site |
| {doc}`volto_listing_variation` | listing_variation | volto-ploneconf |
| {doc}`searchable` | searchable | ploneconf.site |
| {doc}`volto_components_sponsors` | sponsors | volto-ploneconf |
| {doc}`volto_addon` | |
| {doc}`volto_custom_addon` | |
| {doc}`volto_custom_addon2` | |
| {doc}`user_generated_content` | |
| {doc}`relations` | relations |
| {doc}`user_generated_content` | user_generated_content | ploneconf.site |
| {doc}`relations` | relations | ploneconf.site |
| {doc}`voting-story/index` | | training.votable, volto-training-votable |
| {doc}`deployment_code` | |
| {doc}`code` | |
| {doc}`trainer` | |

% TODO list of chapters with tags for frontend `volto-ploneconf`



## Updating the code-package

Expand Down
7 changes: 2 additions & 5 deletions docs/mastering-plone/configuring_customizing.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
myst:
html_meta:
"description": ""
"property=og:description": ""
"description": "What you can do through the web without touching the code"
"property=og:description": "What you can do through the web without touching the code"
"property=og:title": "Configuring and Customizing Plone 'Through The Web'"
"keywords": "Plone, configuration"
---
Expand All @@ -11,9 +11,6 @@ myst:

# Configuring and Customizing Plone "Through The Web"

% TODO Update for Plone 6!
% TODO Add Volto screenshots for control panels

(customizing-controlpanel-label)=

## The site setup
Expand Down
13 changes: 7 additions & 6 deletions docs/mastering-plone/custom_search.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
myst:
html_meta:
"description": ""
"property=og:description": ""
"property=og:title": ""
"keywords": ""
"description": "Provide a customized search"
"property=og:description": "Provide a customized search"
"property=og:title": "Custom search"
"keywords": "filter, faceted search"
---

(custom-search-label)=
Expand All @@ -30,14 +30,14 @@ Remember what we did to show featured content on the front page.
- The field `type_of_talk` needs to be indexed in catalog.
- `type_of_talk` needs to be a collection criterion.
After adding an index and a criterion, and restarting the backend, and re-installing the add-on, the index is present in catalog but empty.
After adding an index and a criterion, restarting the backend, and re-installing the add-on, the index is present in catalog but empty.
For populating the index you can go to http://localhost:8080/Plone/portal_catalog/manage_catalogIndexes and reindex the new index.
In case you want to change something of the index, the index can be deleted.
A re-start of the backend, a re-install of the add-on and a new re-index of the index will populate the index.
Check the entries by switching to "Browse" button.
Check the entries by switching to the "Browse" tab.
```

````{dropdown} Solution
Expand Down Expand Up @@ -71,4 +71,5 @@ Check the entries by switching to "Browse" button.
</records>
```
Checkout `ploneconf.site` at tag "search" to see the updated code.
````
Loading

0 comments on commit 66ba1db

Please sign in to comment.