ByteEditor Website Builder
Wiki menu
Header Customization
By following the steps in this instruction, you will be able to create your custom header. You can use the code snippets provided in the guide to recreate this header, or you can modify the steps to tailor the header to your specific needs.
Step 1. Create the header view
- Open the project folder
- Open the “Views” → “Partials” folder. It already contains the built-in headers (“header1.cshtml”–“header3.cshtml”) and their shared markup (“headerShared.cshtml”).
- Create a file named “header4.cshtml”
- Copy the following code and paste it into the file
5. Save the file and rebuild the project. Umbraco 17 compiles views when the project is built, so a header view saved without a rebuild has no effect.
Step 2. Add the header to the Header Options list
- Open “Settings” → “Data Types” → “Design - Header Options - Dropdown” (in the “ByteEditor” folder).
- Add a new option “header4”. The option must match the file name of the view, without “.cshtml”.
- Click “Save”.
Step 3. Select the header in your design
- Open “Content” → “Design Builder” and open the design your site uses.
- In “Header Options”, select “header4”.
- Click “Save and publish”, then open your site.
💡 The header's colours come from the “Header” colours of your design in the Design Builder, so the new header follows the theme without any extra CSS.
💡 In the back office, the Header block preview (Settings → Header) shows one of the built-in layouts: a custom header is only rendered on the website itself.
💡 Upgrading from version 4? The “ByteEditor:CustomHeaders” section in “appsettings.json” and the AngularJS “.html” header view are no longer used in version 17. You can remove them.