Skip to content

Add Subsite content type to Website distribution - #59

Merged
sneridagh merged 3 commits into
mainfrom
feature/86-subsite-content-type
Sep 9, 2026
Merged

sneridagh merged 3 commits into
mainfrom
feature/86-subsite-content-type

Conversation

@sneridagh

Copy link
Copy Markdown
Member

Summary

Adds a Subsite Dexterity content type to the Website distribution, ported from the intranet distribution.

A Subsite is a navigation-root Container, so it gets its own navigation and breadcrumbs, and it enables the shared volto-light-theme (VLT) header/theme/footer behaviors for a per-subsite logo and customization. This is a backend-only change — the frontend rendering already ships via VLT.

Work item: https://gitlab.kitconcept.io/kitconcept/distribution-kitconcept-website/-/work_items/86

Acceptance criteria coverage

Criterion Delivered by
Add a "Subsite" FTI global_allow, add_permission = kitconcept.website.siteadminsonly
Own navigation plone.navigationroot behavior
Breadcrumbs start on the subsite plone.navigationroot (Volto core reads it)
Logo in header & footer voltolighttheme.header + voltolighttheme.footer / kitconcept.footer (already vendored)
Customize a subsite voltolighttheme.theme + header/footer behaviors

What's included

  • content.subsite.Subsite / ISubsite
  • Subsite FTI, types.xml registration, repositorytool.xml versioning
  • kitconcept.website.siteadminsonly permission + rolemap.xml granting it to Site Administrator & Manager
  • Upgrade step 20260909001 (rolemap, typeinfo, repositorytool) for existing sites
  • FTI / behaviors / navigation-root tests (tests/content_types/test_ct_subsite.py)

Notes

  • Adaptations from the intranet FTI: dropped the intranet-only kitconcept.intranet.location behavior; permission renamed to the website namespace.
  • Second commit fixes two pre-existing ruff E501 violations in controlpanels/dsgvo.py that make lint flags locally (string values unchanged). CI's ruff check --diff never caught them because E501 is unfixable; a follow-up to close that CI gap in plone/meta config will be handled separately.

Follow-up (not in this PR)

  • Playwright acceptance spec verifying a subsite renders its own header/footer logo (nearest navigation root).

Test plan

  • make -C backend test for the new type — 28 passed
  • make -C backend format — clean
  • make -C backend lint — 10/10, exit 0

Add a Subsite Dexterity content type, ported from the intranet
distribution. A Subsite is a navigation-root Container so it gets its
own navigation and breadcrumbs, and it enables the shared VLT
header/theme/footer behaviors for a per-subsite logo and customization.

- content.subsite.Subsite / ISubsite
- Subsite FTI, type registration and repositorytool versioning
- kitconcept.website.siteadminsonly permission + rolemap (Site
  Administrator, Manager) so only site admins can add a Subsite
- upgrade step 20260909001 (rolemap, typeinfo, repositorytool)
- FTI/behaviors/navigation-root tests

Work item: https://gitlab.kitconcept.io/kitconcept/distribution-kitconcept-website/-/work_items/86
Wrap two over-length description strings across additional implicit
string-concatenation lines so `make lint` (ruff check --fix) passes.
The resulting string values are unchanged; no behavior change.

These lines predate this branch; CI's `ruff check --diff` does not fail
on unfixable violations like E501, so it never flagged them.
Verify the Subsite feature end to end in the frontend:

- a Subsite created via the API renders with its own header logo,
  distinct from the site root logo (per-navigation-root resolution)
- a descendant page inherits the subsite's logo, confirming the logo
  resolves from the nearest navigation root via the `inherit` expander

Work item: https://gitlab.kitconcept.io/kitconcept/distribution-kitconcept-website/-/work_items/86
@sneridagh
sneridagh merged commit b6a72b0 into main Sep 9, 2026
24 checks passed
@sneridagh
sneridagh deleted the feature/86-subsite-content-type branch September 9, 2026 15:37
<element value="plone.versioning" />
<element value="plone.locking" />
<element value="plone.translatable" />
<element value="plone.navigationroot" />

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 is a tangent, but looking at this made me realize we should probably add the kitconcept.seo fields to all content types in kitconcept-website

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants