Skip to content

Conversation

@stevepiercy
Copy link
Contributor

@stevepiercy stevepiercy commented Nov 6, 2024

See #1748 (comment)

Closes #1754.

Ping @petschki to take it from here.


📚 Documentation preview 📚: https://plone6--1757.org.readthedocs.build/

Ping @petschki
- Enhance the Development Guide index
- Update the term Buildout in the Glossary to point to dusty old, yet useful, docs in Plone 4.

(cherry picked from commit 8142b96)
- Add term reference for Buildout
# Create a backend add-on

This section explains how a developer can create an {term}`add-on` for the Plone backend.
You will use a framework called {term}`GenericSetup` and a tool called {term}`Buildout`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite get your vision for this section yet.

Most of the documentation that can be written about how to create a backend add-on will be relevant regardless of how Plone was installed, and also regardless of whether the add-on was created from a Cookieplone template, bobtemplates.plone, or by hand.

So mentioning buildout here is off topic.

And learning about GenericSetup is a piece of what goes into creating an add-on, but it's certainly not the only or the most important piece.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created this file to jump start something for @petschki to work on. I have no vision about this whatsoever. If the snippets aren't needed, they can be tossed out.

I moved the snippets here from another document that had them as headings in a how-to guide, instead of in a conceptual guide. IOW no one does "How to Buildout and GenericSetup".

@stevepiercy stevepiercy changed the title Add Create a backend add-on section in the Developer guide. Add Create a backend add-on section in the Developer guide with GenericSetup Nov 24, 2024
@stevepiercy
Copy link
Contributor Author

I'm ready to close this issue as won't fix. Does anyone on @plone/classicui-team care about the topic of how to add or create a backend add-on section in the Developer guide with GenericSetup? If so, speak up, and let's get this finished.

@petschki
Copy link
Member

@stevepiercy will have a look at this.

@petschki
Copy link
Member

I've created a basic "addon creation documentation" and moved the old docs for GenericSetup here. I've also removed several outdated parts/link and tried to update the XML examples. Not finished yet though.

I would recommend to place these docs all inside "Backend" and make a link from "Developer guide / Develop backend add-ons" -> "Backend / Add-ons" (like its done for Volto add-ons)

Further we can add references for several plonecli installation guides (like Classic-UI / theming / create theme addon) to the new "Backend / Add-on" doc ...

What do you think?

@petschki
Copy link
Member

petschki commented Nov 25, 2025

what's also missing is something like "Installing backend Add-on" ... at least I didn't find it... would also make sense to add it to "Backend / Add-ons" chapter.

EDIT: I mean adding a pypi package or source checkout to cookieplone/buildout project ...

@stevepiercy
Copy link
Contributor Author

what's also missing is something like "Installing backend Add-on" ... at least I didn't find it... would also make sense to add it to "Backend / Add-ons" chapter.

EDIT: I mean adding a pypi package or source checkout to cookieplone/buildout project ...

Was this what you couldn't find?

https://6.docs.plone.org/admin-guide/add-ons.html

The plan is to merge the Admin section into Develop section so that people don't have to think of what role they're in versus the task they want to perform. See #1997.

@petschki
Copy link
Member

Ah ... exactly.

Merging this to development section makes completely sense to me. Maybe we can do it like Volto does, to have an Developer Guide -> Add-ons directory, with `create/add/test" sub chapters.

Sidenote: what confuses me is, that when I click "Developer Guide -> Develop Volto Add-ons" I get redirected directly to the Volto Development 2nd level subdirectory ... from a UI perspective I would never redirect directly when clicking in the navigation area, instead have at least a small introductionary text in the content area with the link to the desired target.

@stevepiercy
Copy link
Contributor Author

Sidenote: what confuses me is, that when I click "Developer Guide -> Develop Volto Add-ons" I get redirected directly to the Volto Development 2nd level subdirectory ... from a UI perspective I would never redirect directly when clicking in the navigation area, instead have at least a small introductionary text in the content area with the link to the desired target.

In a perfect world, we'd have one repo for all documentation in an easy-to-organize hierarchy. However, we use submodules to pull in documentation from multiple repos, and therefore can't easily have a single hierarchical structure. plone.restapi and plone.api have similar things.

We made the decision to use redirects as a compromise. There are placeholder files there that perform the actual redirect when the meta refresh tag fails in a browser for security reasons, but people were annoyed that they had to click twice to get to the content. Eventually, when the re-organization dust settles, we'll look into symlinks.

@stevepiercy
Copy link
Contributor Author

@petschki it's a holiday weekend here in the US. I'll review this next week.

Did you copy and paste this from the sources listed in the description, or did you modify any of it? It needs some serious editorial work.

@petschki
Copy link
Member

petschki commented Nov 26, 2025

I've copied the merged GenericSetup document and removed the outdated parts ... I'll finish that this week. Happy Thanksgiving ...


```shell
uvx plonecli create addon <addon namespace package>
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove using plonecli to create the addon. The latests alpha release calls uvx cookieplone under the hood, so it does the same.

We keep the addon template in there because all the testing is based on creating the addon

All templates below `addon` can be added to your newly created addon with:

```shell
uvx ploncli add <subtemplate>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uvx ploncli add <subtemplate>
uvx plonecli add <subtemplate>

```shell
uvx ploncli add <subtemplate>
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also use make add <subtemplate> inside the backend folder of the structure created by cookieplone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo
Status: Todo

Development

Successfully merging this pull request may close these issues.

Port GenericSetup docs

9 participants