Skip to content

Custom exporter logic - #2101

Open
gforcada wants to merge 1 commit into
6.0from
custom-export
Open

Custom exporter logic#2101
gforcada wants to merge 1 commit into
6.0from
custom-export

Conversation

@gforcada

@gforcada gforcada commented Aug 21, 2026

Copy link
Copy Markdown
Member

Description

This is part of plone/plone.exportimport#86

Where an easy way to customize the default content exporter is added.

@stevepiercy

Copy link
Copy Markdown
Member

@gforcada would you please request a review from whoever can provide a technical review? I've already requested two folks, based on the linked PR and the related training author.

@gforcada

Copy link
Copy Markdown
Member Author

@stevepiercy thanks for doing that, I will try to remember next time. I will add another one, just to have higher chances of one actually reviewing it

@gforcada
gforcada requested a review from ericof August 21, 2026 11:07
@stevepiercy

Copy link
Copy Markdown
Member

I'll do an editorial review, after the technical parts are verified. Thanks for your collaboration.

@davisagli davisagli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks accurate for the proposed implementation in plone/plone.exportimport#86, but I also asked a question there to confirm whether @gforcada has confirmed this does what he needs.

Comment thread docs/admin-guide/export-import.md Outdated
Comment thread docs/admin-guide/export-import.md
Comment thread docs/admin-guide/export-import.md Outdated
Comment thread docs/admin-guide/export-import.md Outdated
Comment thread docs/admin-guide/export-import.md
# custom logic to select which specific content gets exported
```

With this, the default `plone-exporter` will no longer export **all content**.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's a bit of a limitation. Maybe you want all of the content sometimes, and different subsets at other times. This makes me wonder whether we should have named IObjectsExporter adapters, and make it possible to specify which one to use in the CLI

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I had quite a few ideas to improve what gets exported:

  • add a control panel that lists what gets exported (a fancy print of what IObjectsExporter returns)
  • add dexterity behavior that allows to mark objects to be always/never exported
    • thinking about privacy or mandatory objects
  • on that control panel add a checkbox to use either the full or subset export

I'm not sure if there are enough users for such use cases, that's why we started with first allowing to customize the logic, and then we can expand further if there is a need for it

@gforcada

Copy link
Copy Markdown
Member Author

@davisagli thanks for the review, all points are either addressed or commented 😄

@davisagli davisagli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok from me from a technical perspective.

It should have a {versionadded} notice since it wasn't available in existing releases.

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

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

3 participants