umbraco-controllers
Umbraco Controllers
What is it?
Controllers are separate classes that contain or reuse logic across elements while maintaining connection to an element's lifecycle. A Controller is assigned to a Host Element and supports lifecycle methods (hostConnected, hostDisconnected, destroy) for managing side effects, timers, subscriptions, and cleanup. Controllers can host other controllers, enabling composition and reuse of functionality.
Documentation
Always fetch the latest docs before implementing:
- Main docs: https://docs.umbraco.com/umbraco-cms/customizing/foundation/umbraco-controller
- Write Custom Controller: https://docs.umbraco.com/umbraco-cms/customizing/foundation/umbraco-controller/write-your-own-controller
- Foundation: https://docs.umbraco.com/umbraco-cms/customizing/foundation
Workflow
- Fetch docs - Use WebFetch on the URLs above
- Ask questions - Need custom controller? What lifecycle events? What cleanup needed?
- Generate code - Implement controller extending UmbControllerBase based on latest docs
- Explain - Show what was created and how to host it
More from umbraco/umbraco-cms-backoffice-skills
umbraco-backoffice
Umbraco backoffice extension customisation - complete working examples showing how extension types combine
183umbraco-dashboard
Implement dashboards in Umbraco backoffice using official docs
168umbraco-extension-template
Create new Umbraco backoffice extensions using the official dotnet template
168umbraco-quickstart
Quick setup for Umbraco extension development - creates instance, extension, and registers it
166umbraco-property-editor-ui
Implement property editor UIs in Umbraco backoffice using official docs
163umbraco-openapi-client
Set up OpenAPI client for authenticated API calls in Umbraco backoffice (REQUIRED for custom APIs)
163