How plone/plone.app.theming works
Core Components
• Theme Engine (Diazo Integration)
• Control Panel Interface
• Theme Transform Pipeline
• Theme Resources Manager
• Plugin System
Main Architectural Layers
a) Presentation Layer:
• Control Panel UI (controlpanel.pt)
• Theme Error Handling (theme-error.pt)
b) Business Logic Layer:
• Theme Transform Engine (transform.py)
• Theme Policy Manager (policy.py)
• Plugin System (plugins directory)
• Events Handler (events.py)
c) Integration Layer:
• Export/Import Handlers (exportimport directory)
• Traversal System (traversal.py)
• ZMI Integration (zmi.py)
Resource Management
• Theme Resources
• Rules Processing
• Custom CSS Handling
• Static Resources
• [Plone Frontend] ←→ [Theme Control Panel]
• ↓
• [Theme Transform Pipeline]
• ↓
• [Diazo Engine Integration]
• ↓
• [Theme Resources & Rules]
Connection Types
• Double lines: Data transformation flows
Component Interactions
• How plugins hook into the main system
• Theme resource loading paths
Integration Points
• Plone integration points
• Diazo engine connection
• ZMI integration
Key Elements to Emphasize:
Theme Processing Pipeline
• [Request] → [Transform Middleware] → [Rules Processing] → [Theme Application] → [Response]
Configuration Flow
• [manifest.cfg] → [Theme Registry] → [Policy Manager] → [Transform Engine]
Plugin Architecture
• [Core Engine] ← [Plugin Registry] → [Custom Plugins]
Remember to:
• Clear boundaries between components
• Notes for critical processes
• Version-specific features separately