Template overrides

Replace the panel's markup for editors, displays and other parts

Add a view at the same path as one of the panel's templates, and yours is used everywhere instead.

To changeAdd
A built-in editorAreas/StellarAdmin/Views/Shared/EditorTemplates/Editors/{Name}.cshtml
A built-in editor in inline rowsAreas/StellarAdmin/Views/Shared/GridEditorTemplates/Editors/{Name}.cshtml
A built-in display, in display fields and view pagesAreas/StellarAdmin/Views/Shared/DisplayTemplates/Displays/{Name}.cshtml
A built-in display, in grid cellsAreas/StellarAdmin/Views/Shared/GridDisplayTemplates/Displays/{Name}.cshtml
The environment indicatorAreas/StellarAdmin/Views/Shared/_EnvironmentIndicator.cshtml
The sidebar headerAreas/StellarAdmin/Views/Shared/_SidebarBrand.cshtml
The user menuAreas/StellarAdmin/Views/Shared/_SidebarUserMenu.cshtml

{Name} is the editor or display without its suffix: TextInput, Select, RadioGroup, Number, Boolean, and so on.

All of them need the view imports.

Write your template for the behaviour you need, rather than copying the built-in one: the built-in templates read internal view data that can change between versions.

The sidebar's own view isn't something you can override. Use the sidebar settings instead.

Your own editors and displays

To add a new editor or display rather than change a built-in one, see custom editors and custom displays.

On this page