Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The Umbraco UI should work in all modern browsers:
Chrome (Latest)
Edge (Chromium)
Firefox (Latest)
Safari (Latest)
Below you can find the minimum requirements to run Umbraco 10 on your machine:
One of the .NET 6 - Supported OS versions
One of the following .NET Tools or Editors:
Visual Studio Code with the IISExpress extension
Microsoft Visual Studio 2022 version 17.0 or higher.
Optional: JetBrains Rider version 2022.3 and higher
When using Visual Studio as your primary Integrated Development Environment (IDE) we recommend finding and downloading the Software Development Kits (SDKs) for Visual Studio.
As Umbraco releases are aligned to the .NET release cadence, it's also aligned with Microsoft's Long-term support policy for the underlying framework. For the best experience, we would recommend that you ensure to be on latest and supported Microsoft versions to run and host Umbraco CMS:
Ubuntu Supported distributions and other Linux Packages
For the above, as Umbraco version 10 is based on .NET 6 you will need to follow the .NET 6 supported versions.
As Umbraco version 10 is based on .NET 6 follow the requirements for .NET 6.
For more information, see the Host and deploy ASP.NET Core applications article in the Microsoft documentation.
You can use Umbraco Cloud to manage the hosting infrastructure. All Umbraco Cloud plans are hosted on Microsoft Azure, which gives your site a proven and solid foundation.
Ability to set file permissions to include create/read/write (or better) for the user that "owns" the Application Pool for your site. This would typically be NETWORK SERVICE.
The database account used in the connection string will need permissions to read and write from tables. It will also require permission to create schema during installs and upgrades:
The db_owner
role has full permissions on the database.
To use an account with more restricted permissions, the db_datareader
and db_datawriter
roles will be needed for normal use to read from and write to the database. The db_ddladmin
role, which can modify the database schema, is required for installs and upgrades of the CMS and/or any packages that create database tables.
For more information on the Database-level roles, see the Microsoft documentation.
For more information on how to create a database user via SQL, you can check the Microsoft documentation.
Information on the requirements to setup, install & upgrade Umbraco
How to install and configure your Umbraco installation.
Defines the system requirements to run Umbraco.
Umbraco installation steps and guidelines.
Covers the steps to upgrade your copy of Umbraco to a newer version.
Information about server setup for Umbraco including information about permissions and load balancing.
How to configure your Umbraco installation. Includes information about all of Umbraco's configuration files and options.
How to install the latest nightly builds.
Instructions on installing Umbraco on various platforms using various tools.
The fastest way to get the latest version of Umbraco up and running is using the command line (CLI).
Open your command line.
Install the Umbraco templates:
Create a new project:
Navigate to the newly created project folder. It will be the folder containing the .csproj
file:
Build and run the newly created Umbraco site:
The console will output a message similar to: [10:57:39 INF] Now listening on: https://localhost:44388
Open your browser and navigate to that URL.
Follow the instructions to finish up the installation of Umbraco.
Members of the Umbraco Community have created a website that makes the installation of Umbraco a lot easier for you. You can find the website at https://psw.codeshare.co.uk. On the website, you can configure your options to generate the required script to run. Click on the Install Script tab to get the commands you need to paste into the terminal. This tab also includes the commands for adding a starter kit or unattended install which creates the database for you.
There are numerous ways to install Umbraco. Below, you can find links to different installation methods that will help you easily install and set up Umbraco projects.
.NET CLI, included with the .NET Software Development Kit (SDK), can be used to install or uninstall .NET templates from NuGet. This can be done by using the dotnet new
command on any OS. The underlying Template Engine enables the creation of custom templates which make new project bootstrapping much faster. With a few steps you can have an Umbraco project running without the need for a code editor.
Visual Studio is used to write native code and managed code supported by .NET and many others. Its built-in tools provide the ability to develop and execute applications for any platform. Developers will be able to install Umbraco without ever having to leave Visual Studio.
Learn how to run an already installed local installation of Umbraco.
Visual Studio Code is an editor with an embedded webserver (through the IIS Express extension). A fast way to get you up and running with Umbraco.
From Umbraco v9 and above you can use the Nightly Builds to get the latest version to use and test before it is released. Learn how to install the Nightly builds to get started.
Since Umbraco 9 it has been possible to run Umbraco CMS natively on Linux or macOS High Sierra. To get Umbraco running you will need to follow some steps.
Use the Unattended installs when spinning up Umbraco instances on something like Azure Web Apps to avoid having to run through the installation wizard.
This section describes how to use the runtime mode setting to optimize Umbraco for the best development experience or optimal production environment.
You can configure the runtime mode to optimize Umbraco for different development experiences and environments by setting Umbraco:CMS:Runtime:Mode
to one of the available modes:
BackofficeDevelopment
(default)
Development
Production
This can be done via the appsettings.json
file, environment variables, or any other .NET configuration provider (like Azure Key Vault/App Configuration). Although this setting affects how Umbraco behaves at runtime, some modes have prerequisites on how the project is built/published. Make sure to read the descriptions of each mode before changing this setting from the default BackofficeDevelopment
mode, as incorrect configuration can result in your application not starting (by throwing a BootFailedException
).
The BackofficeDevelopment
mode is the default behavior for Umbraco: it does not optimize Umbraco for any specific environment and does not have any prerequisites. This mode allows for rapid development (without having to recompile/rebuild your project), including all development from within the backoffice.
The Development
mode can be used when you're developing from an IDE (like Visual Studio, VS Code, or Rider) or the dotnet CLI (e.g. using dotnet watch
). It is a recommended prerequisite if you want to use the Production
mode in your production environment.
This mode disables in-memory ModelsBuilder generation and validates the following setting:
Umbraco:CMS:ModelsBuilder:ModelsMode
is not set to InMemoryAuto
.
If you want to use the generated models, use SourceCodeAuto
or SourceCodeManual
, which requires manually recompiling the project after the models have changed (e.g. after updating Document Types, Media Types, Member Types, or Data Types). Razor views (cshtml
files) will still be automatically compiled at runtime, allowing you to quickly iterate on the rendered output from templates, (macro) partial views, and view components.
The recommended approach to enable Development
mode is to update the appsettings.json
file with the following settings:
Ensure your models are generated by running Umbraco and navigating to Settings > Models Builder > Generate models. You can remove the following properties from your csproj
project file to enable the compilation of Razor views (which also ensures your views do not contain compilation errors and is a prerequisite for enabling Production
mode):
Fix any compilation errors you might get after this, e.g. if you accidentally referenced deleted models or properties. Running the application will still show the rendered content and you're now ready to optionally enable Production
mode on your production environment.
Ensure you have the <CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
property set in your csproj
project file, so Razor views are always copied to the publish directory. This is required by the CMS to display the contents in the backoffice, for Forms to lookup custom theme views and for Deploy to be able to compare schemas (otherwise you'll get schema mismatches).
Use Production
mode to ensure your production environment is running optimally by disabling development features and validating whether specific settings are configured to their recommended production values.
The application is built/published in Release mode (with JIT optimization enabled), e.g. using dotnet publish --configuration Release
;
Umbraco:CMS:WebRouting:UmbracoApplicationUrl
is set to a valid URL;
Umbraco:CMS:Global:UseHttps
is enabled;
Umbraco:CMS:RuntimeMinification:CacheBuster
is set to a fixed cache buster like Version
or AppDomain
;
Umbraco:CMS:ModelsBuilder:ModelsMode
is set to Nothing
.
The recommended approach to enable Production
mode is to update the appsettings.Production.json
file (or create one) with the following settings:
Although you can still edit document types and views (if not running from the published output), changes won't be picked up until you've rebuilt your project or republished the application.
Models won't be generated by ModelsBuilder (because the mode is set to Nothing
), requiring you to do all your changes while in Development
mode.
As Models Builder are set to Nothing
, the Models Builder dashboard is disabled in the backoffice of live environment.
Also ensure the UmbracoApplicationUrl
is updated to the primary URL of your production environment, as this is used when sending emails (password reset, notifications, health check results, etc.) and the keep-alive task.
Validation of the above-mentioned settings is done when determining the runtime level during startup using the new IRuntimeModeValidationService
and when it fails, causes a BootFailedException
to be thrown. The default implementation gets all registered IRuntimeModeValidators
to do the validation, making it possible to remove default checks and/or add your own (inherit from RuntimeModeProductionValidatorBase
, if you only want to validate against the production runtime mode). The following validators are added by default:
JITOptimizerValidator
- Ensure the application is built/published in Release mode (with JIT optimization enabled) when in production runtime mode, e.g. using dotnet publish --configuration Release
;
UmbracoApplicationUrlValidator
- ensure Umbraco:CMS:WebRouting:UmbracoApplicationUrl
is configured when in production runtime mode;
UseHttpsValidator
- ensure Umbraco:CMS:Global:UseHttps
is enabled when in production runtime mode;
RuntimeMinificationValidator
- ensure Umbraco:CMS:RuntimeMinification:CacheBuster
is set to a fixed cache buster like Version
or AppDomain
when in production runtime mode;
ModelsBuilderModeValidator
- ensure Umbraco:CMS:ModelsBuilder:ModelsMode
is not set to InMemoryAuto
when in development runtime mode and set to Nothing
when in production runtime mode.
The following example removes the default UmbracoApplicationUrlValidator
and adds a new custom DisableElectionForSingleServerValidator
:
Information on how to deploy Umbraco in a Load Balanced scenario and other details to consider when setting up Umbraco for load balancing
Information on how to deploy Umbraco in a Load Balanced scenario and other details to consider when setting up Umbraco for load balancing.
Configuring and setting up a load balanced server environment requires planning, design and testing. This document should assist you in setting up your servers, load balanced environment and Umbraco configuration.
This document assumes that you have a fair amount of knowledge about:
Umbraco
IIS 10+
Networking & DNS
Windows Server
.NET5+
It is highly recommended that you setup your staging environment to also be load balanced so that you can run all of your testing on a similar environment to your live environment.
These instructions make the following assumptions:
All web servers can communicate with the database where Umbraco data is stored
You are running Umbraco 9.0.0 or above
You will designate a single server to be the backoffice server for which your editors will log into for editing content. Umbraco will not work correctly if the backoffice is behind the load balancer.
There are three design alternatives you can use to effectively load balance servers:
Each server hosts copies of the load balanced website files and a file replication service is running to ensure that all files on all servers are up to date
The load balanced website files are located on a centralized file share (SAN/NAS/Clustered File Server/Network Share)
You will need a load balancer to do your load balancing.
In order to understand how to host your site it is best to understand how Umbraco's flexible load balancing works.
The following diagram shows the data flow/communication between each item in the environment:
The process is as follows:
Administrators and editors create, update, delete data/content on the backoffice server
These events are converted into data structures called "instructions" and are stored in the database in a queue
Each front-end server checks to see if there are any outstanding instructions it hasn't processed yet
When a front-end server detects that there are pending instructions, it downloads them and processes them and in turn updates it's cache, cache files and indexes on its own file system
There can be a delay between content updates and a front-end server's refreshing, this is expected and normal behaviour.
Although there is a backoffice server designated for administration, by default this is not explicitly set as the "Scheduling server". In Umbraco there can only be a single scheduling server which performs the following 3 things:
Keep alive service - to ensure scheduled publishing occurs
Scheduled tasks - to initiate any configured scheduled tasks
Scheduled publishing - to initiate any scheduled publishing for documents
Umbraco will automatically elect a "Scheduling server" to perform the above services. This means that all of the servers will need to be able to resolve the URL of either: itself, the Backoffice server, the internal load balancer, or the public address.
There are two server roles:
SchedulingPublisher
- Usually this is the backoffice instance.
Subscriber
- These are the scalable front-end instances - not recommended to be used for backoffice access.
These new terms replace 'Master and Replica', in Umbraco versions 7 and 8.
Each instance will be allocated a role by the automatic server role election process, but they can also be set explicitly (recommended)
For example, In the following diagram the node f02.mysite.local is the elected "Scheduling server". In order for scheduling to work it needs to be able to send requests to itself, the Backoffice server, the internal load balancer or the public address. The address used by the "Scheduling server" is called the "umbracoApplicationUrl".
By default, Umbraco will set the "umbracoApplicationUrl" to the address made by the first accepted request when the AppDomain starts. It is assumed that this address will be a DNS address that the server can resolve.
For example, if a public request reached the load balancer on www.mysite.com
, the load balancer may send the request on to the servers with the original address: www.mysite.com
. By default the "umbracoApplicationUrl" will be www.mysite.com
. However, load balancers may route the request internally under a different DNS name such as "f02.mysite.local" which by default would mean the "umbracoApplicationUrl" is "f02.mysite.local". In any case the elected "Scheduling server" must be able to resolve this address.
In many scenarios this is fine, but in case this is not adequate there's a few of options you can use:
The below section applies to all ASP.NET load balancing configurations.
This section describes the configuration options depending on your hosting setup:
The replacement for Machine Keys in ASP.NET Core are called Data Protection. You will need to setup data protection to the same keys on all servers, without this you will end up with view state errors, validation errors and encryption/decryption errors since each server will have its own generated key.
Because Umbraco in some cases uses TempData, your setup needs to be configured with a distributed cache.
There are some logging configurations to take into account no matter what type of load balancing environment you are using.
Your staging environment should also be load balanced so that you can see any issues relating to load balancing in that environment before going to production.
You'll need to test this solution a lot before going to production. You need to ensure there are no windows security issues, etc... The best way to determine issues is have a lot of people testing this setup and ensuring all errors and warnings in your application/system logs in Windows are fixed.
Ensure to analyze logs from all servers and check for any warnings and errors.
When upgrading it is possible to run the upgrades unattended.
Here's some common questions that are asked regarding Load Balancing with Umbraco:
Question> Why do I need to have a single web instance for Umbraco admin?
TL:DR You must not load balance the Umbraco backoffice, you will end up with data integrity or corruption issues.
The reason you need a single server is because there is no way to guarantee transactional safety between servers. This is because we don't currently use database level locking, we only use application (c#) level locks to guarantee transactional data integrity which is only possible to work on one server. If you have multiple admins saving and publishing at once between servers then the order in which this data is read and written to the database absolutely must be consistent otherwise you will end up with data corruption.
Additionally, the order in which cache instructions are written to the cache instructions table is important for LB, this order is guaranteed by having a single admin server.
Question> Can my SchedulingPublisher backoffice admin server also serve front-end requests?
Yes. There are no problems with having your SchedulingPublisher backoffice admin server also serve front-end request.
However, if you wish to have different security policies for your front-end servers and your back office servers, you may choose to not do this.
All the fundamentals of using Umbraco - from making a local installation to extending the backend.
In this part of the Umbraco CMS documentation, you can get to know the product and the default functionality. It is here you start your Umbraco journey with the installation, setup, and basics of working with the CMS.
Your main resource when building and managing an Umbraco CMS website.
Umbraco CMS is a flexible and editor-friendly Content Management System (CMS) that allows you to create beautiful and modern websites. Use the latest version of .NET, integrate with your favorite services, and help your customers launch a website tailored to their specific needs.
Learn much more about Umbraco CMS and get an overview of the top features on Umbraco.com.
The Umbraco CMS documentation caters to both experienced Umbraco/.NET developers and beginners with guides and high-level articles.
Resources and links for older versions of Umbrco CMS.
This documentation platform covers only major versions of the Umbraco CMS since Umbraco 9. If you are using an older version of Umbraco CMS, you will need to go elsewhere.
The documentation for Umbraco 7 and 8 lives on our.umbraco.com.
A guide to install Umbraco CMS using Visual Studio.
Install the newest Umbraco dotnet templates.
In Visual Studio 2022, the .NET CLI templates are enabled to appear, by default. For information on how to enable .NET CLI templates in Visual Studio 2019, see the .NET CLI Templates in Visual Studio article.
Check the Requirements to ensure you have everything you need to start your Umbraco project.
This is an abbreviated version of the installation steps. Jump to the Create a new project section for a more thorough guide.
Open Visual Studio.
Go to File
> New
> Project
, search for Umbraco.
Choose Umbraco Project (Umbraco HQ) then click Next.
Choose or specify the parameters, leave the default or leave them all empty.
Click Create.
Use CTRL+F5 to run the project and start the Umbraco installer.
To install Umbraco we first need to install Umbraco's dotnet new templates.
For more information check the first 2 steps of the Install Umbraco with .NET CLI article.
Go to File > New > Project and search for Umbraco
in the Search for templates field.
Once you select Umbraco Project (Umbraco HQ) navigate to the next step by selecting Next.
In this step, you will be able to give your project a name specific to the project you are creating.
Refrain from changing the Solution name, as this will cause a namespace conflict with the CMS itself.
In the next step, you are able to specify some additional parameters like the Target framework. The rest are optional.
You can then click the Create button and your Umbraco Project will be ready for you.
You can now run the site through Visual Studio using F5 or the Debug button.
Follow the installation wizard and after a few steps, you will get a message saying the installation was a success.
You are now ready to start building your Umbraco project. Have a look below for different resources on the next steps.
This article describes how to run an Umbraco 9 site on a local IIS server.
This is a quick guide on getting your Umbraco website running locally on IIS.
The guide will assume you already have IIS configured and know your way around it, as well as having a local website you wish to host.
First, you need to ensure you have "Development time IIS support installed". To check this, go to the Visual Studio installer, click modify and check on the right side under "ASP.NET and web development":
Once that is installed you should set up a new IIS site - and make sure to add the hostname to your hosts file as well. Here is my setup for an example:
For the path you want to point it at the root of your site - where the .csproj
file is.
You might need to change permissions for the NuGet cache folder - C:\users\<username>\.nuget\packages
. The user or group (IIS_IUSRS) that the IIS site is running on requires Read permissions on this folder because this is where some of the files for Umbraco and Umbraco packages are being served from during development. If the IIS user or group does not have permission to read from the NuGet cache folder, you could run into a DirectoryNotFoundException
while running the site.
When the site is published these files are copied from the NuGet cache folder to wwwroot/umbraco
and wwwroot/App_Plugins
and these folders will typically have the correct permissions. For more information on setting permissions, see the File and folder permissions article.
At this point you can go to your Visual Studio solution of the site and in the Properties
folder there is a launchSettings.json
file, that looks like this:
You can add a new profile called IIS, and point it at your local domain. Here it is with my example domain:
At this point IIS will be added to the launch profiles, and you can run the site from Visual Studio by choosing IIS in the dropdown:
And finally the site is running from your local IIS:
This is the guide for upgrading existing installations in general.
In this article, you will find everything you need to upgrade your Umbraco CMS project.
You will find instructions on how to upgrade to a new minor or major version as well as how to run upgrades unattended.
The following lists a few things to be aware of before initiating an upgrade of your Umbraco CMS project.
Sometimes there are exceptions to general upgrade guidelines. These are listed in the . Be sure to read this article before moving on.
Check if your setup meets the for the new versions you will be upgrading your project to.
Things may go wrong for different reasons. Be sure to ALWAYS keep a backup of both your site's files and the database. This way you can always return to a version that you know works.
Before upgrading to a new major version, check if the packages you're using are compatible with the version you're upgrading to. On the package's download page, in the Project compatibility area, click View details to check version-specific compatibility.
It is necessary to run the upgrade installer on each environment of your Umbraco site. This means that you need to repeat the steps below on each of your environments in order to complete the upgrade.
The steps outlined in this article apply to modern Umbraco from version 10 and later versions.
Are you upgrading to a minor for Umbraco 6, 7, or 8? You can find the appropriate guide below:
You can upgrade to a new major of Umbraco CMS directly by using NuGet.
Switching to a new major of Umbraco CMS also means switching to a new .NET version. You need to make sure that any packages used on your site are compatible with this version before upgrading.
The package compatibility can be checked on the package's download page. Locate the Project compatibility area and select View details to check version-specific compatibility.
Use the table below to determine which .NET version to upgrade to when going through the steps below.
It's recommended that you upgrade the site offline and test the upgrade fully before deploying it to the production environment.
Stop your site in IIS to prevent any changes from being made while you are upgrading.
Open your Umbraco project in Visual Studio.
Right-click on the project name in the Solution Explorer and select Properties.
Select the .NET version from the Target Framework drop-down.
Go to Tools > NuGet Package Manager > Manage NuGet Packages for Solution...
Go to the Installed tab in the NuGet Package manager.
Upgrade Umbraco.Cms.
a. Select the correct version from the Version drop-down.
b. Click Install to upgrade your project.
Make sure that your connection string has TrustServerCertificate=True
in order to complete successfully the upgrade:
Restart your site in IIS, build, and run your project to finish the installation.
NuGet installs the latest version of the package when you use the dotnet add package
command unless you specify a package version:
dotnet add package Umbraco.Cms --version <VERSION>
Add a package reference to your project by executing the dotnet add package Umbraco.Cms
command in the directory that contains your project file.
Run dotnet restore
to install the package.
For v9: If you are using SQL CE in your project you will need to run dotnet add package Umbraco.Cms.SqlCe --version <VERSION>
before running the dotnet restore
command. From v10, SQL CE has been replaced with SQLite so a dotnet restore
should be sufficient. If this is not working then you will need to run dotnet add package Umbraco.Cms.Persistence.Sqlite --version <VERSION>
and then dotnet restore
.
When the command completes, open the .csproj file to make sure the package reference was updated:
When upgrading your Umbraco project, it is possible to enable the upgrade to run unattended. This means that you will not need to run through the installation wizard when upgrading.
Below you will find the steps you need to take in order to upgrade your project unattended.
Are you running a load balanced setup with multiple servers and environments?
Add the Umbraco:Cms:Unattended:UpgradeUnattended
configuration key.
Set the value of the key to true
.
With the correct configuration applied, the project will be upgraded on the next boot.
The Runtime level will use Run
instead of Upgrade
to allow the website to continue to boot up directly after the migration is run. This happens instead of initiating the otherwise required restart.
The upgrade is run after Composers but before Components and the UmbracoApplicationStartingNotification
. This is because the migration requires services that are registered in Composers and Components require that Umbraco and the database are ready.
Follow the steps outlined below to use unattended upgrades in a load balanced setup.
Deploy to all environments.
Set the Umbraco:CMS:Unattended:UpgradeUnattended
configuration key to true
for the Main server only.
Boot the Main server and the upgrade will run automatically.
Wait for the upgrade to complete.
Boot the Read-Only servers and make sure they do not show the “upgrade required” screen.
In some cases, you might need to install Umbraco instances automatically without having to run through the installation wizard to configure the instance.
You can use the Unattended installs feature to allow for quick installation and set up of Umbraco instances on something like Azure Web Apps.
This article will give you the details you need to install Umbraco unattended.
In order to get a clean instance of Umbraco, follow our installation guide for how to .
As you will not be running through the installation wizard when using this feature, you need to manually tell Umbraco which database to use.
Set up and configure a new database - see for details.
Add the connection string using configuration.
Umbraco can create an SQL Server database for you during the unattended install process. The user specified by the credentials in your connection string needs to have the CREATE DATABASE
permission granted and the global setting is set to true
.
If your connection string is for SQLite or SQL Server Express LocalDB it is assumed that a database should be created when missing. This is regardless of the value of the InstallMissingDatabase
setting.
A value is configured for the keyumbracoDbDSN_ProviderName
to ensure usage of the Microsoft.Data.SQLite
ADO.NET provider.
It is recommended that you make use of the values shown below for the Cache
, Foreign Keys
and Pooling
keywords on your connection string.
The unattended installs feature is disabled by default. In order to enable it, you need to add the following JSON object to a JSON configuration source.
Remember to set the value of InstallUnattended
to true
.
The keys for this would then be as follows:
After completing the steps above you can now initialize the installation by booting up the Umbraco instance.
Once it has completed, you should see the following when visiting the frontend of the site.
Depending on your preferences, you can use any type of configuration to specify the connection string and login information, as well as enable unattended install. With the extending configuration functionality, it is possible to read from all kinds of sources. One example can be using a JSON file or environment variables.
Program.cs has a condition, which if met, an appsettings.Local.json file will be added and configured as a configuration source.
Having intellisense will help you to add your connection string and information needed for the unattended install.
We have added support for unattended installs with Name, Email and Password, and Connection String as CLI params, which are also available in Visual Studio. There you can fill in your information as follows:
Follow these steps to set up an Umbraco project with VS Code. The benefit of using VS Code is that it is super quick to get up and running.
Go to and download VS Code for free.
Once installed, launch VS Code.
Click the extensions menu at the bottom on the left side. Then search for C#, install it then press reload.
Open your project folder in VS Code, your project will look something like this:
Now we need to tell VS Code how to run your project.
Open the command palette, you can use the shortcut Ctrl+Shift+P
, and type in Tasks: Configure
and select the Tasks: Configure Task
option:
Select "Create task.json from template"
Now select ".NET Core" as your template.
After this VS Code will have created a folder called .vscode
that contains a file called tasks.json
, it's this file that tells VS Code how to build your project.
Now that we've told VS Code how to build your project, we need to tell it how to launch it. VS Code can do this for you. First, select the little play button in the left side menu, and then select the "create a launch.json file" link.
This will prompt a menu to appear, select .NET 5+ and .NET Core:
If .NET 5+ and .NET Core is missing in the drop-down menu:
Press Ctrl + Shift + P (on Windows/Linux) or Cmd + Shift + P (on macOS) to open the Command Palette.
Search for the command .NET: Generate Assets for Build and Debug
. This command will generate the necessary assets for building and debugging your .NET application.
Now you'll see a green play button appear with a dropdown where ".NET Core Launch" is selected.
If you navigate to the Files section, a new launch.json
file is created in the .vscode
folder. When you press F5, the launch.json
file tells VS Code to build your project, run it, and then open a browser .
With that, you're ready to run the project! Press F5, or click the little green play button in the Run and Debug section to run your brand new Umbraco site locally.
This section continues from where we left off but covers the installation and configuration of Umbraco inside your web browser when you run Umbraco for the first time.
You will see the install screen where you will need to fill in some data before Umbraco can be installed.
When the installer is done you will automatically be logged into the backoffice.
Congratulations, you have installed an Umbraco site!
You can log into your Umbraco site by entering the following into your browser: http://yoursite.com/umbraco/.
This guide will show you how to migrate the content from your Umbraco 7 site to a site running Umbraco 8.
Umbraco 8 contains a lot of breaking changes and a lot of code has been cleaned up compared to Umbraco 7. Due to this, it will not be possible to do a direct upgrade from Umbraco 7 to Umbraco 8. You need to migrate your content from your Umbraco 7 site into your Umbraco 8 site and then recreate the rest in the new version.
A content migration tool has been implemented in Umbraco 8.1.0, to help you with the transition.
In this guide you can read more about the tool, its limitations, and how to use it in practice.
Migrating Umbraco Cloud sites
Follow the to upgrade your Umbraco 7 site on Cloud.
In the following section, you can learn more about the limitations of migrating content from Umbraco 7 to Umbraco 8.
The content migration tool is a database migration, which is made for the database schema of Umbraco 7.14+. This means that in order to do the migration you need to ensure your Umbraco 7 site is running at least Umbraco 7.14.
Umbraco 8 does not support MySQL databases. This means that the migration will not work when moving from an Umbraco 7 site using MySQL to Umbraco 8 on SQL Server
The database types that are supported are SQL Server and SQL CE.
Feedback from user testing has shown that some databases are harder to migrate than others.
There are two ways to work around this issue:
Migrate to version 8.5 as a first step and then post-migration, carry out a normal Umbraco upgrade to the latest version of Umbraco 8, or
The migration will transform the data stored in third party editors as well. However, it will be stored as it was in Umbraco 7. If the structure has changed or the property editor doesn't exist, you will still be able to find the data in the database. It will, however, not be available in the backoffice.
When the migrations are running, Umbraco will go through your entire Umbraco 7 database and update it to the format required for Umbraco 8. The schema will be remodeled and transformed into the correct format and your existing compatible data will be transformed to fit with Umbraco 8.
These migrations will be running directly on your database. They are transforming schema and data - not transferring. Therefore always ensure that you have a backup before attempting to do this. In case something goes wrong, you will be able to rollback and try again.
It is highly recommended to clean up your site before running this as it will be quicker.
Empty Content recycle bin
Empty Media recycle bin
In the following guide we will migrate the content of an Umbraco 7.13.1 site to Umbraco 8.1.0.
The site in this example is an Umbraco 7.13.1 site, and we will use Nuget to update it.
When upgrading an old website, check if you are using obsolete properties in your Data Types. These should be changed to their updated counterparts. The migration will fail if you are still using obsolete properties.
The updated properties are:
Content Picker
Media Picker
Member Picker
Multinode TreePicker
Folder Browser
Related Links
You can see if your site is using the obsolete properties from the (Obsolete)
prefix in their name.
Once it is upgraded and you have verified everything is working, move on to the next step.
The first thing to do is to spin up a fresh new Umbraco 8.1+ site. Make sure everything works and that no content is there.
If you have customized the UsersMembershipProvider
on your Umbraco 7 site you need to copy that over to the 8.1 web.config
as well. Additionally you need to update the type
attribute to be type="Umbraco.Web.Security.Providers.UsersMembershipProvider, Umbraco.Web"
.
This also includes the attribute useLegacyEncoding
value. Make sure that this setting is copied into your new Umbraco 8 site, as it is needed in order to log in.
Take a backup of your database from the Umbraco 7.14 site. Take the information for the backup database and add that to the connectionstring for the Umbraco 8.1 site. If you are running SQL CE, you will have to copy the database over to the new site as well.
Once the connectionstring is set, the final step is to change the Umbraco version number in the web.config
on the Umbraco 8.1 site. Chang it to 7.14.0
. This will indicate that there is an upgrade pending and it needs to run the migration.
The version will be set to 8.1.0, and you need to change it to the version you are currently migrating from.
When you start the site it will ask you to login and then show you this screen:
From here, the automatic migration will take over, and after a little bit you can log in and see your content:
Please be aware that this is a content migration. If you go to the frontend after following these steps, it will throw errors.
At this point you will have the content but nothing else.
Before moving on to this step, make sure that the Umbraco 8 project is no longer running.
The following files/folders need to be copied into the Umbraco 8 project:
~/Views
- do not overwrite the default Macro and Partial View Macro files, unless changes have been made to these.
~/Media
Any files/folders related to Stylesheets and JavaScripts.
Any custom files/folders the Umbraco 7 project uses, that aren't in the ~/Config
or ~/bin
.
~/App_Data/UmbracoForms
- in the case Umbraco Forms was used on the Umbraco 7 site.
Merge the configuration files carefully to ensure any custom settings are migrated while none of the default configurations for Umbraco 8 is overwritten.
You'll have to revisit all templates and custom implementations to get the site up and running, as all markup is still Umbraco 7-specific.
Are you planning on continuing the migration to the latest version on Umbraco CMS?
Then you can skip the step to revisit the template files and custom implementation. We highly recommend waiting with this step until you've reached the latest version.
As you are updating your template files and custom implementation, you should also verify your configuration files and settings.
Umbraco 8 contains a few changes regarding the Sections in the Umbraco Backoffice. Because of this, you should also check your User Groups and make sure they have access to the appropriate sections.
Learn how to upgrade your Umbraco 8 project to Umbraco 10.
It is currently not possible to upgrade directly from Umbraco 8 to the latest version.
The recommended approach for upgrading from version 8 to the latest version is to use this guide to upgrade from Umbraco 8 to Umbraco 10. Umbraco 10 contains the that must be upgraded from Umbraco 8. You can then use the steps to upgrade from Umbraco 10 to the latest version.
Since the underlying framework going from Umbraco 8 to the latest version has changed, there is no direct upgrade path. That said, it is possible to re-use the database from your Umbraco 8 project on your new project in order to maintain the content.
It is not possible to migrate the custom code as the underlying web framework has been updated from ASP.NET to ASP.NET Core. All templates and custom code will need to be reimplemented.
You also need to make sure that the packages you are using are available on the latest version.
A Umbraco 8 project running the latest version of Umbraco 8.
A clean installation of the latest version of Umbraco.
A backup of your Umbraco 8 project database.
If you use Umbraco Forms, then on the clean installation of Umbraco, you will need to install Umbraco.Forms
package as well.
The video below shows how to complete the upgrade on an Umbraco Cloud project. Most of the process is the same, however, the video does contain some Cloud-specific elements.
Import the database backup into SQL Server Management Studio.
Update the connection string in the new projects appsettings.json
file so that it connects to the Umbraco 8 database:
You can also add the connection details if you spin up a clean installation.
Run the new project and login to authorize the upgrade.
Select "Upgrade" when the upgrade wizard appears.
Once the upgrade has been completed, it's recommended to login to the backoffice to verify if your project is upgraded to new version.
This is only content migration and the database will be migrated.
You need to manually update the view files and custom code implementation. For more information, see Step 3 of this guide.
The following files/folders need to be copied from the Umbraco 8 project into the new project:
~/Views
- Do not overwrite the default Macro and Partial View Macro files unless changes have been made to these.
~/Media
- Media folder from v8 needs to be copied over into the wwwroot - media
folder
Any files/folders related to Stylesheets and JavaScript.
Migrate custom configuration from the Umbraco 8 configuration files (.config
) into the appsettings.json
file on the new project.
As of Umbraco Forms version 9, it is only possible to store Forms data in the database. If Umbraco Forms was used on the Umbraco 8 project, the files need to be migrated to the database.
Run the new project.
It will give you an error screen on the frontend as none of the Template files have been updated.
The latest version of Umbraco is different from Umbraco 8 in many ways. With all the files and data migrated, it is now time to rewrite and re-implement all custom code and templates.
One of the changes is how published content is rendered through Template files. Due to this, it will be necessary to update all the Template files (.cshtml
) to reflect these changes.
Template files need to inherit from Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.HomePage>
instead of Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.HomePage>
Template files need to use ContentModels = Umbraco.Cms.Web.Common.PublishedModels
instead of ContentModels = Umbraco.Web.PublishedModels
Depending on the extent of the project and the amount of custom code and implementations, this step is going to require a lot of work.
Once the new project runs without errors on a local setup it is time to deploy the website to production.
This concludes this tutorial. Find related information and further reading in the section below.
Instructions on installing nightly builds of Umbraco.
In this article, we'll explain how you can get the latest builds of Umbraco. You can do this in three steps:
The NuGet feed containing the nightly builds is https://www.myget.org/F/umbraconightly/api/v3/index.json
.
You can either add this feed through the command line or use an IDE of your choice. In this article, we'll provide steps for:
To add the nightly feed using the command line:
Open a command prompt of your choice.
Run the following command:
Now the feed is added as a source named Umbraco Nightly
.
To add the nightly feed using Visual Studio:
Open Visual Studio.
Go to Tools > NuGet Package Manager > Package Manager Settings.
The Options window open.
Select the Package Sources option in the NuGet Package Manager section.
Click the +
icon.
A new Package source will be added automatically and highlighted.
Enter the desired name for the feed in the Name field.
Enter the link https://www.myget.org/F/umbraconightly/api/v3/index.json
into the Source field.
Click OK.
Now the feed is added as a source named Umbraco Nightly
.
To add the nightly feed using Rider:
Open Rider.
Go to View > Tool Windows > NuGet.
Go to Sources tab.
Choose the C:\Users\Úmbraco\AppData\Roaming\NuGet\NuGet.Config
to add the feed globally.
Cick the green +
button in the New Feed field.
The New feed dialog opens.
Enter the desired name in the Name field.
Enter https://www.myget.org/F/umbraconightly/api/v3/index.json
in the URL field.
Leave the User, Password fields empty, and the Enabled checkbox ticked.
Click OK.
Now the feed is added as a source named Umbraco Nightly
.
In the previous steps, we've added the feed and are now ready to install the nightly build.
However, which version should we install? This is, in particular, an issue if we want to create a new site using the dotnet template. The dotnet command does not allow us to use wildcard characters to install the newest version.
Using IDE, we can see a list of available versions in both Visual Studio and Rider. We can then use that version to install the template.
Here we're going to assume that you want to create a brand new site with the dotnet template. The approach is the same if you're updating an existing site. You'll click the Update button for the Umbraco.Cms
package instead of installing the template through the terminal.
Let's look at how we can find the latest version of the nightly build:
You can use the package manager in Visual Studio to browse the available template versions.
Open Visual Studio.
Go to Tools > NuGet Package Manager > Manage NuGet Packages For Solution...
Select Umbraco Nightly from the Package source dropdown in the NuGet - Solution window.
Check the Include prerelease checkbox.
Search for Umbraco.Templates in the Browse field.
Choose that package.
Click on the Version dropdown and see the available nightly builds.
Choose the applicable version and note down the version number.
You can use the NuGet window in Rider to browse the available template versions.
Open Rider.
Go to the Packages tab in the NuGet window..
Select Umbraco Nightly from the All Feeds dropdown.
Check the Prerelase checkbox.
Search for Umbraco.Templates in the Search field.
Choose that package.
Click on the Version drop down and see the available nightly builds.
Choose the applicable version and note down the version number
Now that our feed is added and we know the exact version we're ready to install our template.
To install the latest nightly version template:
Open your command prompt.
Run the following command using the latest version:
With that, we've successfully installed the latest nightly build of Umbraco.
All we have to do now is to create a site using the dotnet new umbraco -n MyAwesomeNightlySite
command.
This document covers specific upgrade steps if a version requires them. Most versions do not require specific upgrade steps and you will be able to upgrade directly from your current version.
Use the information below to learn about any potential breaking changes and common pitfalls when upgrading your Umbraco CMS project.
If any specific steps are involved with upgrading to a specific version, they will be listed below.
Use the to complete the upgrade of your project.
You can find a list of all the released Umbraco versions on website. When you visit Our Umbraco website, click on the version number to view the changes made in that specific version.
Are you looking to upgrade an Umbraco Cloud project from 9 to 10? Follow the guide made for instead, as it requires a few steps specific to Umbraco Cloud.
This article provides details on how to upgrade to the next minor version when using Umbraco 7.
Sometimes there are exceptions to these guidelines, which are listed in the .
It is necessary to run the upgrade installer on each environment of your Umbraco site. If you want to update your staging and live site then you need to repeat the steps below and make sure that you click through the install screens to complete the upgrade.
In this article you will find instructions for 2 different ways of upgrading:
Open up the Package Console and type: Update-Package UmbracoCms
Choose "No to All" by pressing the "L" when prompted.
If there are any specific configuration changes required for the version you are upgrading to then they will be noted in the .
Alternatively, you can use the Visual Studio NuGet Package Manager to upgrade:
Open the NuGet Package Manager and select the Updates pane to get a list of available updates.
Choose the package called UmbracoCms and select update.
The upgrade will run through all the files and make sure you have the latest changes while leaving the files you have updated.
You will be asked to overwrite your web.config file and the files in /config, make sure to answer No to those questions.
For some inexplicable reason, the installation will fail if you click "No to All" (in the GUI) or answer "L" (in the package manager console) to the question: "File 'Web.config' already exists in project 'MySite'. Do you want to overwrite it?" So make sure to only answer "No" (in the GUI) or "N" (in the package manager console).
We will overwrite the web.config
file. We'll back it up so don't worry. You can find the backup in App_Data\NuGetBackup\20140320-165450\
. The 20140320-165450
bit is the date and time when the backup occurred, which varies. You can then merge your config files and make sure they're up to date.
Copy the following folders from inside the .zip file over the existing folders in your site:
/bin
/Umbraco
/Umbraco_Client
There are hosting providers (we know of one: RackSpace Cloud) that require proper casing of file and folder names. Generally, on Windows, this is not a problem. Is your hosting provider forcing proper casing? You'll then need to verify that folders and files are named in the same casing as the version you're upgrading to.
You can expect some changes to the following configuration files:
Any file in the /Config
folder
The /Global.asax
file
The web.config
file in the root of your site (Important: make sure to copy back the version number, and the connection string as they were.)
In rare cases, the web.config
file in the Views folder
There's also the possibility that files in the /Config
folder are new or have been removed(we note this in the release notes). WinMerge (and other diff tools) is able to compare folders as well so you can spot these differences.
Up until version 6.0.0 it was necessary to change the version number in ClientDependency.config
. This was to clear the cached HTML/CSS/JS files in the backoffice. Change the current version number to one that's higher than that. Make sure not to skip this step as you might get strange behavior in the backoffice otherwise.
Some packages (like Contour and Umbraco Forms) add dialogs to the UI.xml
. Make sure to merge those changes back in from your backup during the upgrade so that the packages continue to work. This file can be found in: /Umbraco/Config/Create/UI.xml
.
Packages like Contour, Umbraco Forms, and Courier also make changes to the language files located in: /Umbraco/Config/Lang/*.xml
(typically en.xml
).
After copying the files and making the config changes, you can open your site. You should see the installer which will guide you through the upgrade.
The installer will do two things:
Update the version number in the web.config
Upgrade your database in case there are any changes
We are aware that, currently, the installer is asking you for the database details of a blank database while upgrading. In the near future this will be pre-filled with your existing details and the wording will be updated. So no need to be scared. Enter the details of your existing database and Umbraco will upgrade it to the latest version when necessary.
One important recommendation is to always remove the install
folder immediately after upgrading Umbraco and never to upload it to a live server.
Google Chrome has notoriously aggressive caching. If something doesn't seem to work well in the backoffice, make sure to clear cache and cookies thoroughly (for other browsers as well). Normally the browser cache problem is automatically handled in an Umbraco upgrade by modifying the config/ClientDependency.config version number. If you wish to re-force this update you can increment this version number. This will ensure that any server-side cache of JavaScript and stylesheets gets cleared as well.
One way to nudge the cache in Chrome is to open the developer tools (F12) and go to the settings (the cog icon). There will be a checkbox that says "Disable cache (while DevTools is open)". Once this checkbox is on you can refresh the page and the cache should be invalidated. To force it even more, the "reload" button next to your address bar now has extra options when you right-click it. It should have "Normal reload", "Hard reload" and "Empty cache and hard reload" now. The last option is the most thorough and you might want to try that.
Since Umbraco 9 it has been possible to run Umbraco CMS natively on Linux/macOS.
With Umbraco CMS on .NET Core, Linux/macOS is natively supported with SQLite as the database.
In the below section, we describe how to get started with running Umbraco CMS.
To get started with Umbraco CMS first have a look at the .
Once you've made sure you meet the requirements it is time to install the Umbraco Templates on your system.
To do this follow the guide.
With the templates installed on your system, it is now possible to create Umbraco projects.
To create a project, there are two options:
Continue creating projects using the .NET CLI.
Create new projects using Visual Studio.
To create new projects using Visual Studio, you can use the guide.
Once you create a new project it will use SQLite by default.
If you want to use an SQL server database, you will need to .
This document should be used as a reference, not a step by step guide. Upgrading will largely depend on what version of Umbraco you are currently running, what packages you have installed and the many
The still apply to this process as well.
It is critical that you back up your website and database before upgrading. There are database changes made during installation and you cannot revert an Umbraco 7 database to an Umbraco 6 database.
Umbraco 7 is built on .Net 4.5 and your development environment will require this version installed in order to operate. Visual Studio users may require 2012 or higher.
Umbraco 7 requires browsers with proper HTML 5 support, these include Chrome, Firefox, IE10+
Before you upgrade be sure to read the list of breaking changes. This is especially recommended if you have removed or modified code in the core or if one of these breaking changes directly affects your installation.
for more details.
It is recommended to rebuild all Examine indexes after completing the upgrade.
You should re-generate the XML cache. This can be done by following the prompts when visiting the following URL:
your-domain.com/umbraco/dialogs/republish.aspx?xml=true
It is recommended that you use a Diff tool to compare the configuration file changes with your own current configuration files.
/web.config
updates
You will need to compare the new Umbraco 7 web.config
with your current web.config
. Here is a quick reference of what needs to change:
Remove the section name="BaseRestExtensions"
section
Remove the section name="FileSystemProviders"
section
Remove the sectionGroup name="system.web.webPages.razor"
section
Remove the <FileSystemProviders>
element
Remove the BaseRestExtensions
element
Remove the add key="umbracoUseMediumTrust"
element
Remove the system.web.extensions
element
Removes the xhtmlConformance
element
Remove the system.codedom
element
Remove the compilation
assemblies, /compilation
Remove the system.web.webPages.razor
element
New: sectionGroup name="umbracoConfiguration"
section
New: umbracoConfiguration
element
Ensure that the targetFramework="4.5"
is added to the httpRuntime
element
Add add key="ValidationSettings:UnobtrusiveValidationMode" value="None"
to the appSettings
element
/config/clientdependency.config
changes
remove add name="CanvasProvider"
element
/views/web.config
updates
New macroscripts/web.config
config/umbracoSettings.config
Remove the EnableCanvasEditing
element
Remove the webservices
element
Removed xsltExtensions.config
/config/applications.config
and /config/trees.config
have some icon paths and names updated. You need to merge the new changes into your existing config files.
/config/tinyMceConfig.config
The inlinepopups
is compatible and supported in Umbraco 7. You need to remove these elements: plugin loadOnFrontend="true"
, inlinepopups/plugin
;
The plugins element that is shipped with Umbraco 7 looks like this:
You need to merge the changes from the new tinyMceConfig
file into yours. The command
elements that have changed are: JustifyCenter
, JustifyLeft
, JustifyRight
, JustifyFull
, umbracomacro
, umbracoembed
, mceImage
, subscript
, superscript
, styleselect
Remove the command: mceSpellCheck
/config/dashboard.config
You need to merge the changes from the new dashboard.config
into yours. Some of the original dashboard entries that were shipped with Umbraco 6 have been replaced or removed.
Umbraco 7+ will no longer support medium trust environments. There are now some assemblies used in the core that do not support medium trust but are used extensively. Plugin scanning now also allows for scanning Umbraco's internal types which requires full trust.
Content, Media, Members, and Data Type trees will no longer raise the legacy tree events (based on BaseTree). It is recommended to change all tree event handlers to use the new tree events that fire for every tree in Umbraco including legacy trees. The new tree events are static events and are found in the class Umbraco.Web.Trees.TreeControllerBase
:
MenuRendering
RootNodeRendering
TreeNodesRendering
The Content, Media, Member, and Data Type editors have been re-created and are solely using the new Umbraco Services data layer. This means that operations performed in the backoffice will no longer raise the legacy business logic events (for example, events based on umbraco.cms.businesslogic.web.Document
). It is recommended to change your event handlers to subscribe to the new Services data layer events. These are static events and are found in the services. For example: Umbraco.Core.Services.ContentService.Saved
.
Legacy property editors (pre-Umbraco 7) will not work with Umbraco 7. During the upgrade installation process, Umbraco will generate a report showing you which legacy property editors are installed. These will all be converted to a readonly
Label property editor. No data loss will occur but you'll need to re-assign your existing data types to use a new compatible Umbraco 7 property editor.
Most Umbraco core property editors shipped will be mapped to their equivalent Umbraco 7 editors. The Image cropper editor has not been completed for v7.0.
Since the Related Links property is an advanced property editor, the data format has changed from XML to JSON. This should not have any effect when retrieving the data from razor. If you are outputting Related Links data with XSLT you will need to update your XSLT snippet. Making use of the new library method umbraco.library:JsonToXml
and taking into account that the xml structure has also slightly changed.
One of the database changes made in Umbraco 7 is the change of referencing a property editor from a GUID to a string alias. In order to map a legacy property editor to a new Umbraco 7 version you can add your custom "GUID -> Alias" map during application startup. To do this you would add your map using this method: Umbraco.Core.PropertyEditors.LegacyPropertyEditorIdToAliasConverter.CreateMap
Legacy parameter editors (pre-Umbraco 7) will not work with Umbraco 7. If Umbraco detects legacy parameter editor aliases that do not map to a Umbraco 7 parameter editor it will render a textbox in its place. You will need to update your macros to use a compatible Umbraco 7 parameter editor as those that aren't supported.
Previously, parameter editors were registered in an Umbraco database table: cmsMacroPropertyType
which no longer exists. Parameter editors in Umbraco 7 are plugins like property editors. During the Umbraco 7 upgrade installation process it will update the new cmsMacroProperty.editorAlias
column with the previous parameter editor alias. During this process it will look into the Umbraco.Core.PropertyEditors.LegacyParameterEditorAliasConverter
for a map between a legacy alias to a new Umbraco 7 alias.
Custom legacy parameters can be mapped to new Umbraco 7 parameter editor aliases during installation. This can be done by modifying the mapping during application startup using this method: Umbraco.Core.PropertyEditors.LegacyParameterEditorAliasConverter.CreateMap
.
All database changes will be taken care of during the upgrade installation process.
For database change details see (including all child tasks):
See above for the database updates made for better tag support.
Tags can now be assigned to a nodes property and not only a node
Multiple tag controls can exist on one page with different data
The legacy API does not support this, the legacy API will effectively, add/update/remove tags for the first property found for the document that is assigned a tag property editor.
There is a new ITagService that can be used to query tags
Querying for tags in a view (front-end) can be done via the new TagQuery class which is exposed from the UmbracoHelper. For example: @Umbraco.TagQuery.GetTagsForProperty
You should check with the package creator for all installed packages to ensure they are compatible with Umbraco 7.
We see common errors that we cannot fix for you, but we do have recommendations you can follow to fix them:
The TypeFinder has been deprecated since 4.10 and is now found under Umbraco.Core.TypeFinder
.
While you need to have JavaScript inside menu actions to trigger a response, it is highly recommended that you use the recommended UmbClientMgr
methods. You should not try to override parent.right.document
and similar tricks to get to the right-hand frame.
If you have a webforms page, it is recommended to use the built-in ASP.NET controls to render panels, properties and so on. If you use the raw HTML or try to style it to match the backoffice, you will get out of sync. Follow the guidelines set by Umbraco's internal editors and use the ASP.NET custom controls for UI.
We have made custom Umbraco templates that are available for use with dotnet new
. The steps below will demonstrate the minimum amount of actions required to get you going and set up an Umbraco project from the command line using .NET templates.
Once that is complete, you can see that Umbraco was added to the list of available projects types by running
dotnet new --list
:
In some cases the templates may silently fail to install (usually this is an issue with NuGet sources). If this occurs you can try specifying the NuGet source in the command by running dotnet new install Umbraco.Templates --nuget-source "https://api.nuget.org/v3/index.json"
.
To get help on a project template with dotnet new
run the following command:
dotnet new umbraco -h
From that command's output, you will get a better understanding of what are the default template options, as well as those command-line flags specific to Umbraco that you can use (as seen below):
Create a new empty Umbraco solution using MS SQL Azure/Server:
dotnet new umbraco -n MyCustomUmbracoProject
You will now have a new project with the name MyCustomUmbracoProject, or the name you chose to use. The new project can be opened and run using your favorite IDE or you can continue using the CLI commands.
If you want to create a solution file as well you can run the commands below.
dotnet new sln
dotnet sln add MyCustomUmbracoProject
Navigate to the newly created project folder:
cd MyCustomUmbracoProject
Build and run the new Umbraco .Net Core project:
dotnet build
dotnet run
The next step is to run through the Umbraco CMS installation. If you chose to use MS SQL Server/Azure you will need to add your connection string during this setup process to get access to the Umbraco backoffice.
This section describes different ways of setting up servers for use with Umbraco
This section describes different ways of setting up servers for use with Umbraco
We strongly encourage the use of HTTPS with Umbraco installations especially in production environments. Using HTTPS will greatly enhance the security of your website, see the for more information.
To ensure a stable and smoothly running Umbraco installation, these permissions need to be set correctly.
Information about hosting a v9 application using IIS.
Information on how to deploy Umbraco in a Load Balanced scenario and other details to consider when setting up Umbraco for load balancing.
Best practices for running Umbraco on Azure Web Apps.
The runtime mode setting optimizes Umbraco for the best development experience or optimal production environment.
This article provides details on how to upgrade to the next minor version when using Umbraco 8.
Sometimes there are exceptions to these guidelines, which are listed in the .
It is necessary to run the upgrade installer on each environment of your Umbraco site. If you want to update your staging and live site you need to repeat the steps below. Make sure you click through the install screens so that your upgrade is complete.
In this article you will find instructions for 3 different ways of upgrading:
Open up the Package Console and type: Update-Package UmbracoCms
Choose "No to All" by pressing the "L" when prompted.
If there are any specific configuration changes required for the version you are upgrading to then they will be noted in the .
Alternatively, you can use the Visual Studio NuGet Package Manager to upgrade:
Open the NuGet Package Manager and select the Updates pane to get a list of available updates.
Choose the package called UmbracoCms and select update.
The upgrade will run through all the files and make sure you have the latest changes while leaving files you have updated.
Copy the following folders from inside the .zip
file over the existing folders in your site:
/bin
/Umbraco
There are hosting providers (we know of one: RackSpace Cloud) that require proper casing of file and folder names. Normally on Windows this is not a problem. If your hosting provider however forces proper casing, you will need to verify that the folder and file names are in the same casing as in the newest version you're upgrading to.
You can expect some changes to the following configuration files:
Any file in the /Config
folder
The /Global.asax
file
The web.config
file in the root of your site (Important: make sure to copy back the version number, and the connection string as they were.)
In rare cases, the web.config
file in the /Views
folder
There's also the possibility that some files in the /Config
folder are new or some have been removed (we do make a note of this in the release notes). WinMerge (and other diff tools) can compare folders as well so you can spot these differences.
Some packages like Umbraco Forms add dialogs to the UI.xml
. Make sure to merge those changes back in from your backup during the upgrade so that the packages continue to work. This file can be found in: /Umbraco/Config/Create/UI.xml
.
Packages like Umbraco Forms and Courier also make changes to the language files located in: /Umbraco/Config/Lang/*.xml
(typically en.xml
).
After copying the files and making the config changes, you can open your site. You should see the installer which will guide you through the upgrade.
The installer will do two things:
Update the version number in the web.config
Upgrade your database in case there are any changes
We are aware that, currently, the installer is asking you for the database details of a blank database while upgrading. In the near future this will be pre-filled with your existing details and the wording will be updated. So no need to be scared. Enter the details of your existing database and Umbraco will upgrade it to the latest version when necessary.
When upgrading your Umbraco project to Umbraco v8.12+ it is possible to enable the upgrade to run unattended. This means that you will not need to run through the installation wizard when upgrading.
Below you will find the steps you need to take in order to upgrade your project unattended.
Are you running a load balanced setup with multiple servers and environments?
Add the Umbraco.Core.RuntimeState.UpgradeUnattended
key to appSettings
in your web.config file.
Set the value of the key to true
.
ConfigurationStatus
In order to trigger the actual upgrade, the correct version number needs to be set.
It is important to use the version number of the version that you are upgrading to. If this is not set, the upgrade will not run even if the UpgradeUnattended
key has been set to true
.
Locate the ConfigurationStatus
key in the appSettings
section in your web.config file.
Update the value to match the Umbraco version that you are upgrading to.
With the correct configuration applied, the project will be upgraded on the next boot.
While the upgrade processes are running, any requests made to the site will be "put on hold", meaning that no content will be returned before the upgrade is complete.
The Runtime level will use Run
instead of Upgrade
in order to allow the website to continue to boot up directly after the migration is run, instead of initiating the otherwise required restart.
The upgrade is run after Composers but before Components. This is because the migration requires services that are registered in Composers and Components requires that Umbraco and the database is ready.
Follow the steps outlined below to use run unattended upgrades in a load balanced setup.
Upgrade Umbraco via NuGet in Visual Studio. Make sure the Umbraco.Core.ConfigurationStatus
key in appSetting
in the web.config
file is updated to match the target version.
Deploy to all environments, including the updated appSetting
for Umbraco.Core.ConfigurationStatus
.
Set the Umbraco.Core.RuntimeState.UpgradeUnattended
key in appSetting
in the web.config
to true
for the Main server only.
Request a page on the Main server and the upgrade will run automatically.
Wait for the upgrade to complete.
Browse the Read-Only servers and make sure they do not show the “upgrade required” screen.
One important recommendation is to always remove the install
folder immediately after upgrading Umbraco and never to upload it to a live server.
Google Chrome has notoriously aggressive caching, so if something doesn't seem to work well in the backoffice, make sure to clear cache and cookies thoroughly (for other browsers as well). Normally the browser cache problem is automatically handled in an Umbraco upgrade by modifying the config/ClientDependency.config version number. If you however wish to re-force this update you can increment this version number which will ensure that any server-side cache of JavaScript and stylesheets gets cleared as well.
One way to nudge the cache in Chrome is to open the developer tools (F12) and go to the settings (the cog icon). There will be a checkbox that says "Disable cache (while DevTools is open)". Once this checkbox is on you can refresh the page and the cache should be invalidated. To force it even more, the "reload" button next to your address bar now has extra options when you right-click it. It should have "Normal reload", "Hard reload" and "Empty cache and hard reload" now. The last option is the most thorough and you might want to try that.
Information on hosting Umbraco v9+ on IIS
Install the and download the Hosting Bundle. Ensure you download the correct .NET version as per the .
Once you have the hosting bundle installed and have restarted IIS (net stop was /y
followed by net start w3svc
), create a site in IIS as you would for a v8 site, however you need to ensure that ".NET CLR version" is set to "No Managed Code" for the Application Pool.
You can use the dotnet CLI to compile and collate all files required for hosting
Alternatively you can use folder or ftp publishing in Visual Studio to compile and collate all required files to for the application to run.
In Visual Studio right click on Umbraco web project in the Solution Explorer and choose Publish... command.
Deploy a website for automated deployment with Azure DevOps to IIS
In the Management section you find the Configuration Editor:
One section is of particular interest:
In the first, left hand dropdown list (Section:) choose: system.webServer/aspNetCore
section.
In the second, right hand dropdown list (From:) choose: ApplicationHost.config <location path='[YOUR-SITENAME]'>
. This ensures your settings will be stored in a machine specific file and not the website's web.config. The web.config might end in a public repository and should not contain sensitive data like Connection Strings or SMTP configuration with username and password. Additionally by default the web.config will be overwritten during each publish processes.
Find the line named environmentVariables and open the dialog to add environment variables. These work similar to the launchSettings. E.g. you can define ASPNETCORE_ENVIRONMENT
and create an appSettings.[ASPNETCORE_ENVIRONMENT].json
file. Or even better create environment variables for sensitive settings like passwords. There are some differences to launchSettings.json
configuration:
Variable names need to change the object structure form JSON by combining the segments with double underscore __
e.g. ConnectionStrings__umbracoDbDSN
escaped backslashes \\
e.g. serverName\\databaseInstanceName
are replaced by single backslash \
e.g. DATABASESERVER123\SQL2017
IIS can host .NET 5 applications using 2 different hosting models
In-process hosting runs an .NET 5 app in the same process as its IIS worker process
Out-of-process .NET 5 apps run in a separate from the IIS worker process. The module controls the management of the Kestrel server and requests are proxied between them.
Ensure you read the and general documentation before you begin - you will need to ensure that your ASP.NET Core & logging configurations are correct.
2 x App service plans with 1 x web app in each:
One for the backoffice (Administrative) environment
One for your scalable public-facing environment (Public)
1 x SQL server that is shared with these 2 web apps
The setup above will allow for the proper scaling of the Administrative and Public web apps.
The App Service plan with the Administrative web app should only be scaled up. The reason for this is that the web app needs to stay as a single instance.
The App Service plan with the Public web app can be scaled both out and up.
The single instance Backoffice Administrative Web App should be set to use .
The multi-instance Scalable Public Web App should be set to use .
When an instance of Umbraco starts up it generates some 'temporary' files on disk. In a normal IIS environment, these would be created within the folders of the Web Application. In an Azure Web App, we want these to be created in the local storage of the actual server that Azure happens to be used for the Web App. So we set this configuration setting to 'true' and the temporary files will be located in the environment temporary folder. This is required for both the performance of the website as well as to prevent file locks from occurring due to the nature of Azure Web Apps shared files system.
Host synchronization
When a host restarts, the current host 'winds down' while another host is started. This means there can be more than one live host during a restart. Restarts can occur in many scenarios including when an Azure Web App auto-transitions between hosts, you scale the instances or you utilize slot swapping.
Some file system based services in Umbraco such as the Published Cache and Lucene files can only be accessed by a single host at once. Umbraco manages this synchronization by an object called IMainDom
.
By default Umbraco v9.4 & 9.5 uses a system-wide semaphore locking mechanism. This mechanism only works on Windows systems and doesn't work with multi-instance Azure Web Apps. We need to swap it out for an alternative file system based locking mechanism by using the following appSetting. With Umbraco v10+ FileSystemMainDomLock
is the default setting.
Apply this setting to both the SCHEDULINGPUBLISHER Administrative server and the SUBSCRIBER scalable public-facing servers.
AppDomain synchronization
Some file system based services in Umbraco such as the Published Cache and Lucene files can only be accessed by a single AppDomain at once. Umbraco manages this synchronization by an object called IMainDom
. By default, this uses a system-wide locking mechanism but this default mechanism doesn't work in Azure Web Apps so we need to swap it out for an alternative database locking mechanism by using the following appSetting:
Apply this setting to both the SCHEDULINGPUBLISHER Administrative server and the SUBSCRIBER scalable public-facing servers.
Create an Azure SQL database
Install Umbraco on your backoffice administrative environment and ensure to use your Azure SQL Database
Install Umbraco on your scalable public-facing environment and ensure to use your Azure SQL Database
Test: Perform some content updates on the administrative environment, ensure they work successfully in that environment, then verify that those changes appear on the scalable public-facing environment
Ensure all Azure resources are in the same region to avoid connection lag.
Do not scale your backoffice administrative environment this is not supported and can cause issues.
The public-facing subscriber Azure Web Apps can be manually or automatically scaled up or down and is supported by Umbraco's load balancing.
Since you have 2 x web apps, when you deploy you will need to deploy to both places - There are various automation techniques you can use to simplify the process. That is outside the scope of this article.
This also means that you should not be editing templates or views on a live server as SchedulingPublisher and Subscriber environments do not share the same file system. Changes should be made in a development environment and then pushed to each live environment.
This describes some more advanced techniques that you could achieve with flexible load balancing
The election process that runs during the startup of an Umbraco instance determines the server role that instance will undertake.
There are two server roles to be aware of for flexible load balancing:
SchedulingPublisher
- The Umbraco instance usually used for backoffice access, responsible for running scheduled tasks.
Subscriber
- A scalable instance that subscribes to content updates from the SchedulingPublisher server, not recommended to be used for backoffice access.
These new terms replace 'Master and Replica', in Umbraco versions 7 and 8.
It is recommended to configure an explicit SchedulingPublisher server since this reduces the amount of complexity that the election process performs.
The first thing to do is create a couple of small classes that implement IServerRoleAccessor
one for each of the different server roles:
Now that your subscriber servers are using your custom SubscriberServerRoleAccessor
class, they will always be deemed 'Subscriber' servers and will not attempt to run the automatic server role election process or task scheduling.
By setting your SchedulingPublisher server to use your custom SchedulingPublisherServerRoleAccessor
class, it will always be deemed the 'SchedulingPublisher' and will always be the one that executes all task scheduling.
This description pertains only to Umbraco database tables
In some cases infrastructure admins will not want their front-end servers to have write access to the database. By default front-end servers will require write full access to the following tables:
umbracoServer
umbracoNode
This is because by default each server will inform the database that they are active and more importantly it is used for task scheduling. Only a single server can execute task scheduling and these tables are used for servers to use a server role election process without the need for any configuration. So in the case that a subscriber server becomes the SchedulingPublisher task scheduler, it will require write access to all of the Umbraco tables.
Now that your subscriber servers are using your custom SubscriberServerRoleAccessor
class, they will always be deemed 'Subscriber' servers and will not attempt to run the automatic server role election process or task scheduling. Because you are no longer using the default ElectedServerRoleAccessor
they will not try to ping the umbracoServer table.
umbracoLock
umbracoKeyValue
SQL Server Replica databases cannot be used as they are read-only without replacing the default MainDomLock with a custom provider.
The configurations can be adjusted to control how often the load balancing instructions from the database are processed and pruned.
Below is shown how to do this from a JSON configuration source.
Options:
TimeToRetainInstructions
- The timespan to keep instructions in the database; records older than this number will be pruned.
MaxProcessingInstructionCount
- The maximum number of instructions that can be processed at startup; otherwise the server cold-boots (rebuilds its caches)
TimeBetweenSyncOperations
- The timespan to wait between each sync operations
TimeBetweenPruneOperations
- The timespan to wait between each prune operation
Umbraco v8+ uses Serilog for logging. When load balancing Umbraco consideration should be given as to how the log files from each server will be accessed.
There are many Serilog Sinks available. One of these may be appropriate to store logs for all servers in a central repository such as Azure Application Insights or Elmah.io.
For more information, see .
This section describes best practices with running Umbraco on Azure Web Apps
They have been called a few names in the past, many people still know Azure Web Apps as Azure Web Sites.
App Service is a fully Managed Platform for professional developers that brings a rich set of capabilities to web, mobile and integration scenarios. Quickly create and deploy mission critical web Apps that scale with your business by using Azure App Service.
Umbraco will run on Azure Web Apps but there are some configuration options and specific Azure Web Apps environment limitations to be aware of.
You need to add these configuration values. E.g in a json configuration source like appSettings.json
:
You can also copy the following JSON directly into your Azure Web App configuration via the Advanced Edit feature.
The minimum recommended Azure SQL Tier is "S2", however noticeable performance improvements are seen in higher Tiers
It is important to know that Azure Web Apps uses a remote file share to host the files to run your website. This is due to the files running your website do not exist on the machine running your website. In many cases this isn't an issue. It can become one if you have a large amount of IO operations running over remote file-share.
It's important to know that Azure Web Apps may move your website between their 'workers' at any given time. This is normally a transparent operation. In some cases you may be affected by it if any of your code or libraries use the following variables:
Environment.MachineName
(or equivalent)
When your site is migrated to another worker, these variables will change. You cannot rely on these variables remaining static for the lifetime of your website.
The quickest way to get to your logs is using the following URL template and replacing {app}
with your Web App name:
https://{app}.scm.azurewebsites.net/api/logstream
You can also find this in the KUDU console by clicking Advanced Tools > Log Stream on the Web App in the Azure Portal.
No file replication is configured, deployment handles updating files on the different servers.
If the file system on your servers isn't performing any file replication then no Umbraco configuration file changes are necessary. However Media will need to be configured to use a shared location such as Blob storage or S3.
Depending on the configuration and performance of the environment's local storage you might need to consider and the .
The servers are performing file replication, updates to a file on one server, updates the corresponding file on any other servers.
If the file system on your servers is performing file replication then the Umbraco temporary folder (~/umbraco/Data/TEMP
) must be excluded from replication.
If the file system on your servers is located on shared storage you will need to configure Umbraco to locate the Umbraco temporary folder outside of the shared storage.
A common way to replicate files on Windows Server is to use [DFS](https://msdn.microsoft.com/en-us/library/windows/desktop/bb540031(v=vs.85), which is included with Windows Server.
Additional DFS resources:
There are other alternatives for file replication out there, some free and some licensed. You'll need to decide which solution is best for your environment.
When deploying Umbraco in a load balanced scenario using file replication, it is important to ensure that not all files are replicated - otherwise you will experience file locking issues. Here are the folders and files that should not be replicated:
~/umbraco/Data/TEMP/*
Achieve this by changing the value of the LuceneDirectoryFactory
setting to 'TempFileSystemDirectoryFactory' in the appsettings.json
. The downside is that if you need to view temporary files you'll have to find it in the temp files. Locating the file this way isn't always clear.
Below is shown how to do this in a Json configuration source.
~/umbraco/Logs/*
This is optional and depends on how you want your logs configured (see below)
If for some reason your file replication solution doesn't allow you to not replicate specific files folders (which it should!!) then you can use an alternative approach by using virtual directories.
The following is not the recommended setup but it is a viable alternative:
Copy the ~/umbraco/Data/TEMP
directory to each server, outside of any replication areas or to a unique folder for each server.
Create a virtual directory (not a virtual application) in the ~/umbraco/Data/
folder, and name it TEMP
. Point the virtual directory to the folder you created in step 2.
You may delete the ~/umbraco/Data/TEMP
folder from the file system - not IIS as this may delete the virtual directory - if you wish.
IIS configuration is pretty straightforward with file replication. IIS is only reading files from its own file system like a normal IIS website.
In some scenarios you have a mixture of standalone and synchronised file systems. An example of this is Azure Web Apps where the file system isn't replicated between backoffice and front end servers but is replicated between all front end servers, in this configuration you should follow the steps for synchronised file systems.
The TempFileSystemDirectoryFactory
allows Examine to store indexes directly in the environment temporary storage directory, and should be used instead of SyncTempEnvDirectoryFactory
mentioned above.
The SyncedTempFileSystemDirectoryFactory
enables Examine to sync indexes between the remote file system and the local environment temporary storage directory, the indexes will be accessed from the temporary storage directory. This setting is needed because Lucene has issues when working from a remote file share so the files need to be read/accessed locally. Any time the index is updated, this setting will ensure that both the locally created indexes and the normal indexes are written to. This will ensure that when the app is restarted or the local environment temp files are cleared out that the index files can be restored from the centrally stored index files.
In this article you can learn more about the common terms and concepts that are used throughout the Umbraco Backoffice.
In this article you can learn more about the common terms and concepts that are used throughout the Umbraco backoffice.
When you go to the backoffice for the first time, you're presented with the login screen.
A section in Umbraco is where you do specific tasks related to that section. For example Content, Settings and Users. You can navigate between the different sections of the backoffice by clicking the corresponding icon in the section menu.
The Section menu is the horizontal menu located on the top of the backoffice.
A tree is a hierarchical list of items related (and usually restricted) to a specific concept, like for example content or media.
A node is an item in a tree. Images and folders in the Media section are shown as nodes in the Media tree, pages and content in the Content tree and so forth.
A dashboard is the main view you are presented with when entering a section within the backoffice. It can be used to show valuable information to the users of the system.
Default dashboard in the content section
An editor is what you use to edit different items within the backoffice. There are editors specific to editing stylesheets, there are editors for editing Macros and so forth.
Content is what you find in the Content section. Each item in the tree is called a content node. Each content node in the content tree consists of different fields, and each of them are defined by a Document Type.
Document Types define the types of content nodes that backoffice users can create in the content tree. Each Document Type contains different properties. Each property has a specific Data Type for example text or number.
Every Document Type has properties. These are the fields that the content editor is allowed to edit for the content node.
Each Document Type property has a Data Type which defines the type of input of that property. Data Types reference a Property Editor and are configured in the Umbraco backoffice in the Settings section. A Data Type can be something basic (textstring, number, true/false) or more complex (multi-node tree picker, image cropper, etc).
A property editor is the view used by Data Types to insert content into Umbraco. An example of a property editor is the Textarea. It's possible to have many Textarea Data Types with different settings that all use the Textarea property editor.
Media items are used to store assets like images and video within the Media section and can be referenced from your content.
Media Types are similar to Document Types in Umbraco, except they are specifically for media items in the Media section.
Umbraco comes with 3 default Media Types: File, Folder and Image.
A member is someone who has access to signup, register and login into your public website and is not to be confused with Users.
Similar to a Document Type and a Media Type. You are able to define custom properties to store on a member such as twitter username or website URL.
A Template is where you define the HTML markup of your website and also where you output the data from your content nodes.
A macro is a reusable piece of functionality that you can reuse throughout your site. Macros can be configured with parameters and used on content nodes that has a Rich Text Editor, a Grid editor or a Macro Picker property. You can define what macros are available for your editors to use. When an editor inserts a macro it will prompt them to fill out any of the defined parameters for the macro.
A parameter editor defines the usage of a property editor for use as a parameter for Macros.
A user is someone who has access to the Umbraco backoffice and is not to be confused with Members. When Umbraco has been installed a user will automatically be generated with the login (email) and password entered during installation. Users can be created, edited and managed in the User section.
Content Templates provide a blueprint for content nodes based on an existing node.
Alias: Umbraco.ContentPicker
Returns: IPublishedContent
The content picker opens a panel to pick a specific page from the content structure. The value saved is the selected nodes
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.CheckBoxList
Returns: IEnumerable<string>
Displays a list of preset values as a list of checkbox controls. The text saved is an IEnumerable collection of the text values.
Unlike other property editors, the Prevalue IDs are not directly accessible in Razor.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
This mode disables both in-memory ModelsBuilder generation (see ) and Razor (cshtml) runtime compilation. Production mode requires you to compile your views at build/publish time and enforces the following settings for optimal performance/security:
To compile your views at build/publish time, remove the <RazorCompileOnBuild>
and <RazorCompileOnPublish>
properties from your project file (see the section). If you don't, Umbraco can't find the templates and will return 404 (Page Not Found) errors.
Also, templates cannot be edited on live environment as runtime compilation is not enabled and is set to Production.
You use cloud based auto-scaling appliances like
Recommended: by creating a custom IServerRegistrar
, this means the front-end servers will never be used as the SchedulingPublisher server role.
Set the UmbracoApplicationUrl
property in the
- You use cloud based auto-scaling appliances like
- Each server hosts copies of the load balanced website files and a file replication service is running to ensure that all files on all servers are up to date
- The load balanced website files are located on a centralized file share (SAN/NAS/Clustered File Server/Network Share)
ASP.NET Core supports multiple ways to share keys. Use the to find a description that fits your setup the best.
It is required to setup a distributed cache, like DistributedSqlServerCache
or an alternative provider (see for more details). The distributed cache is used by the session in your application, which is used by the default TempDataProvider in MVC.
Find steps on how to enable the feature for a load balanced setup in the article.
If you have other packages installed such as Umbraco Forms, then before upgrading Umbraco.CMS you will need to upgrade the packages first. Consult the if relevant.
If your database experiences timeout issues after an upgrade, it might be due to 'startupTimeLimit' configuration.
To fix the issue, try increasing the in the web.config
file. Additionally, you can set the value in the in the appsettings.json
file.
Check out the section about .
Upgrade Umbraco via NuGet ()
The 'umbracoDbDSN_ProviderName' attribute sets the .NET Framework data provider name for the DataSource control's connection. For more information on the data providers included in the .Net Framework, see the .
Alternatively you may set your configuration with Environment Variables or other means. Learn more about this in the .
Follow the to create your project folder.
We are collecting . There is a community package: that you can install on your Umbraco 7 site before migration. This will help identify and resolve some of these common issues before triggering the migration steps detailed below.
A migration was introduced in Umbraco 8.6 which can break the migration process. See for more details.
Install the following community Nuget Package: into your Umbraco 8 project before running the migration (no configuration required). This package was created by Umbraco Gold Partner and patches the migration process so you can migrate directly from the latest Umbraco 7 to Umbraco 8.6+ without encountering the above issue. .
In Umbraco 8, property editor configuration is a strongly typed object. There are plenty of examples in the .
To do this, you will create an implementation of IPreValueMigrator
or inherit from the base class .
There are plenty of examples of this in the .
Clean up the database version history (can be done with a script or a package like )
Before the content migration can start the site has to run Umbraco 7.14+. Make sure to always take a backup of the database before doing an upgrade, and then check the .
Following the we will now upgrade via Nuget until we get to this point:
Install the , and run it health check from the Developer section of the backoffice. This is done to identify and resolve some common database schema issues before migration.
If you're stopping at Umbraco 8, you can learn more about .
Learn more about the Section in the
If you use Umbraco Forms, make sure to have to True
before step 1.
Create a backup of the database from your Umbraco 8 project (after you have upgraded to the latest version of v8). For this, you can use the .
As of Umbraco version 9, the configuration no longer lives in the Web.Config
file and has been replaced by the appsettings.json
file. Learn more about this in the article.
, if relevant.
Read more about these changes in the section of the Umbraco CMS documentation.
For more information on the correct namespaces or custom code, you can find the references in the article.
For more information about installing Umbraco, see the article.
Watch the for a complete walk-through of all the steps.
Follow a community guide to migrate from a SQL CE database to SQL Server, like the
Setup a new database for v10 and use to transfer document types and content across.
Setup a new database for v10 and use a premium tool such as to copy database contents across.
Setup a new database for v10 and use a premium tool such as to transfer document types and content across.
If using Umbraco Forms, update your files and folders according to the for version 10 article.
If you are using Umbraco Forms, update your files and folders according to the for version 10 article.
There are a few breaking changes from 8.0.x to 8.1.0. Make sure to check the .
Due to the there are a few steps you will need to take, to make sure that your site works.
Version 7 had a document.GetCulture()
method that was deriving a culture from domains configured in the tree. Somehow, that method was lost during version 8 development (issue ).
Umbraco 8.1 replaces AutoMapper with . This in itself will not break anything on your site. If you have used AutoMapper in your own code you will have to either include the package yourself or switch your implementation to use UmbracoMapper.
Follow the to complete the upgrade
For a full list of breaking changes see:
Follow the to complete the upgrade.
This is possible using Models Builder and through the inclusion of , a package by community member Jeavon Leopold.
Umbraco 7.6.0 also came with new pickers that store their data as a . We wanted to simplify the use of these new pickers and by default we wanted PVC's to always be enabled for those pickers.
Follow the to complete the upgrade.
Find a list of all the breaking changes below and
UrlRewriting.Net ()
UrlRewriting
was old, leaking memory, and slowing down website startup when dealing with more than a few rules. It's entirely replaced by the extension.
Json.Net ()
Json.Net has been updated to version 10.0.0 to benefit from improvements in features, fixes, and performances (see ). This might be a breaking change for people relying on one of the changed functionality.
Log4net ()
ImageProcessor ()
HtmlAgilityPack ()
Membership Provider Encoding ()
Property Value Converters ()
Database ()
More details are available on on the 301 Redirect Tracker GitHub issue tracker.
Scopes ()
Introducing scopes means that some public APIs signatures are changing. Most of these changes target internal and/or non-breaking APIs (as per our ). This should therefore have no impact on sites but may break unit tests.
Property Editors storing UDI instead of ID ()
Rich Text Editor (RTE) Images attributes (, )
There are .
Follow the to complete the upgrade
You may experience an error saying Invalid object name 'umbracoUser'
- this can be fixed by
Follow the to complete the upgrade.
See this article if you are using WebApiConfig.Register
:
For general ASP.NET MVC 5 upgrade details see:
Follow the to complete the upgrade.
Follow the to complete the upgrade.
Follow the to complete the upgrade.
There is a breaking change to be aware of, full details can be found .
Follow the to complete the upgrade.
Follow the to complete the upgrade.
Read and follow
If your site was ever a version between 4.10.0 and 4.11.4 and you have upgraded to 6.0.0 install the and run it after the upgrade process is finished.
If your site was ever a version between 4.10.0 and 4.11.4 install the and run it after the upgrade process is finished.
For people using uComponents 3.1.2 or below, 4.8.0 breaks support for it. Either upgrade to a newer version beforehand or follow the workaround
If you're not upgrading to 7.2.0 or higher then you should follow these extra instructions. If you are upgrading to 7.2.0+ then you can skip this and go to .
Download the .zip file for the new version you are upgrading to from
Use a tool like to check changes between all of the config files. Depending on when you last did this there may have been updates to a few of them.
Details are listed here:
Umbraco is now shipped with minimal settings but the are still available
umbracoSettings
is now a true ASP.NET configuration section
Install the latest .
Run dotnet new install Umbraco.Templates
to install the project templates.
The solution is packaged up into the NuGet package and can be installed into the dotnet CLI.
The project is now running on the and has assigned a free available port to run it on. Look in the terminal window after the dotnet run
command to see the URLs.
Download the .zip
file for the new version you are upgrading to from
Use a tool like to check changes between all of the config files. Depending on when you last did this there may have been updates to few of them.
Check out the section about .
You can use the to deploy your website to your Web Server. This task is a wrapper for MSDeploy.exe
and can be configured as preferred.
- to enable this model you need to edit your .csproj file and add:
Umbraco runs within a .
Each application runs inside an which is like a subprocess within the web app process. When an ASP.Net application restarts, the current AppDomain 'winds down' while another AppDomain is started; meaning there can be more than 1 live AppDomain during a restart. Restarts can occur in many scenarios including when an Azure Web App auto transitions between hosts, you scale the instances or you utilize slot swapping.
Fix the backoffice environment to be the SCHEDULINGPUBLISHER scheduling server and the scalable public-facing environment to be SUBSCRIBERs - see
then you'll need to replace the default IServerRoleAccessor
for the your custom registrars. You'll can do this by using the SetServerRegistrar()
extension method on IUmbracoBuilder
from a .
In order to have read-only database access configured for your front-end servers, you need to implement the configuration mentioned above.
If using on Azure WebApps then write-permissions are required for the following tables for all server roles including 'Subscriber'.
These setting would normally be applied to all environments as they are added to the global app settings. If you need these settings to be environment specific, we recommend using .
If you are load balancing or require the scaling ("scale out") ability of Azure Web Apps then you need to consult the . This is due to the fact that a lot more needs to be configured to support scaling/auto-scaling.
Although Umbraco can be configured to use environmental storage it still requires its working-directory to be writable. If Umbraco is deployed to a read-only file system it will .
For example, Azure's is not supported by Umbraco. To check if your web app is using this feature you can check the WEBSITE_RUN_FROM_PACKAGE
environment variable.
If you require the scaling ("scale out") ability of Azure Web Apps you need to consult the . This is due to the fact that a lot more needs to be configured to support scaling/auto-scaling.
Consult the if you would like to directly reference Azure Key Vault Secrets to your Azure Web App.
Alternatively store the Umbraco temporary files in the local server's 'temp' folder and set Examine to use a .
There is a specific documentation for load balancing with
If you are load balancing with make sure to check out the article we have for that specific set-up.
Once you are familiar with how flexible load balancing works, you might be interested in some .
.
.
You can expand trees by clicking the down arrow to the left of the node or by double-clicking the node.
A package is the Umbraco term for a module or plugin used to extend Umbraco. Packages can be found in the .
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the .
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the .
Umbraco 7 Documentation
Umbraco 8 Documentation
Umbraco EOL Documentation
12
7.0
11
7.0
10
6.0.5
Information on file and folder permissions required for Umbraco sites
To ensure a stable and smoothly running Umbraco installation, these permissions need to be set correctly. These permissions should be set up before or during the installation of Umbraco.
The main account that requires 'modify' file permissions to be set on the folders below, is the account used start Umbraco. If Umbraco is hosted in IIS this will be the Application Pool Identity for the IIS website. Usually IIS APPPOOL\appPoolName or a specific local account or in some circumstances Network Service. If in doubt, ask your server admin / hosting company. Additionally, the Internet User (IUSR) account and IIS_IUSRS account only require 'read only' access to the site's folders.
Generally, when developing locally with Visual Studio or Rider, permissions do not need to be strictly applied.
If you have any specific static files/media items/etc, you should add the appropriate permissions accordingly.
The permissions documentation should allow you to run a plain Umbraco install successfully.
/appSettings*.json
Modify / Full control
Only needed for setting database and a global identifier during installation. So can be set to read-only afterwards for enhanced security.
/App_Plugins
Modify / Full control
Should always have modify rights as the folder and its files are used by packages. Not part of your project by default.
/umbraco
Modify / Full control
Should always have modify rights as the folder and its files are used for cache and storage.
/Views
Modify / Full control
Should always have modify rights as the folder and its files are used for Templates, Partial views, and Macro files.
/wwwroot/css
Modify / Full control
Should always have modify rights as the folder and its files are used for CSS files.
/wwwroot/media
Modify / Full control
Should always have modify rights as the folder and its files are used for Media files uploaded via the Umbraco CMS backoffice.
/wwwroot/scripts
Modify / Full control
Should always have modify rights as the folder and its files are used for script files.
You can choose to customize your editing experience by implementing a custom view for each Block Type of a Block Editor.
By picking a custom view you overwrite the backoffice UI for the given block with your own. This enables you to define how a block should be presented. It can, however, also include interactive elements and be a full custom solution to how data is manipulated. In the Block List Editor the Inline Editing Mode must be disabled for custom backoffice views to appear.
Currently you can only pick HTML files for a custom view. These views are powered by AngularJS and you can write any AngularJS logic.
Your HTML can be anything. If you use it as a representation of the content you would also want the full view to be clickable. This would then open the default editor for editing of your content.
The following example displays the property with the alias headline
together with the description
inside a button to edit your block.
If you would like to display properties of settings
, you can access these by using block.settingsData.myPropertyAlias
.
A custom view of Block List Editor needs to have the 'blockelement__draggable-element' class presented to define which part of the Block that is draggable.
Example:
To achieve this you need to add a custom AngularJS controller to your custom view, using the ng-controller
attribute:
Create a folder inside the App_Plugins
folder called 'CustomBlockView'.
Create two files within the CustomBlockView file: package.manifest
and customBlock.controller.js
.
Add the following JSON to the package.manifest
file:
Umbraco will parse all package.manifest
files and load any resources they reference into the backoffice during startup.
The second file, customBlock.controller.js
, will be used to register the 'customBlockController' defined using the ng-controller
attribute in your custom view.
To register the controller, add the following lines of code:
Your block may enable you to 'pick' an image for use as the background for a particular block. If you try to display this image directly in the view using block.data.image
, you will see the unique ID and not the image.
You will need to use the ID in our custom AngularJS controller in order to get the ImageUrl
to display in our backoffice Block Editor View.
With the setup of files above, you need to amend the customBlock.controller.js
file, by injecting the mediaResource
to retrieve the image from the ID:
Update the Custom View to use the imageUrl
property to display the image:
If you need to use a specific crop, you can inject the imageUrlGeneratorResource
resource, which has a getCropUrl(mediaPath, width, height, imageCropMode, animationProcessMode)
method:
Alias: Umbraco.MultiNodeTreePicker
Returns: IEnumerable<IPublishedContent>
The Multinode Treepicker allows you to configure the type of tree to render and what part of the tree that should be rendered. For content it allows you to select a dynamic root node based on the current document using the multinode tree picker.
Node type: set the type of node, the root node of the tree, or query for the root node
For querying for a root node, you can use dynamic placeholders in the XPath query, following the below sample queries
It is important to notice that all placeholders above act against published content only. So if you, therefore, try to fetch $parent
of the current document, then Umbraco will return that or its closest published ancestor. So in case, the parent is not published, it will try the parent of that parent, and so on.
Filter out items with type: allow or disallow tree nodes with a certain content type alias.
Enter typeAlias,altTypeAlias
to only allow selecting nodes with those alias'. Enter !typeAlias,altTypeAlias
to only allow selecting nodes not with those alias'.
Minimum/maximum number of items: set a limit on the number of items allowed to be selected.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Information on using the Umbraco log viewer in version 8
Umbraco ships with a built-in Log Viewer feature. This allows you to filter and view log entries and perform much more complex search queries. This helps you finding the log entries that you are interested in. You can find the log viewer in the settings section.
Have you ever wanted to find all log entries which contains the same request ID? Or find all items in the log where a property called duration is greater than 1000ms?
With the power of structured logging and a query language we are able to search and find log items for specific scenarios. When debugging the site you should now have more power to see and find patterns in your log files and get rid of those errors.
Here are a handful example queries to get you started, however the saved searches contain some further examples. For more details on the syntax head over to the https://github.com/serilog/serilog-filters-expressions project.
Find all logs that are from the namespace 'Umbraco.Core'
StartsWith(SourceContext, 'Umbraco.Core')
\
Find all logs that have the property 'Duration' and the duration is greater than 1000ms
Has(Duration) and Duration > 1000
\
Find all logs where the message has localhost in it with SQL like
@Message like '%localhost%'
\
Sometimes you want to use a custom query more often. It is possible to save a query and use the dropdown to re-use your saved search. To add a new saved search, use the search box to type your query and click the star icon. In doing so you can give it a friendly name. The saved queries are saved in the database in the table umbracoLogViewerQuery
.
With the flexibility of Umbraco, we give you the power to implement your own ILogViewer
. This makes it possible to fetch logs and the saved searched from a different location such as Azure table storage.
To do this we can implement a base class SerilogLogViewerSourceBase
from Umbraco.Cms.Core.Logging.Viewer
like so.
This uses the Azure.Data.Tables
NuGet package.
Keep in mind that we have to implement our own version of a LogEventEntity
. This is because the TableClient
needs whatever it is fetching to implement the ITableEntity
interface.
Umbraco needs to be made aware that there is a new implementation of an ILogViewer
to register. We also need to replace the default JSON LogViewer that we ship in the core of Umbraco.
Now with the above two classes, we have the plumbing in place to view logs from an Azure Table. However, we are not persisting our logs into the Azure table storage account. So we need to configure the Serilog logging pipeline to store our logs into Azure table storage.
Install Serilog.Sinks.AzureTableStorage from Nuget
Add a new sink to the appsettings with credentials (so logs persist to Azure)
This is a desktop tool for viewing & querying JSON log files from disk in the same way as the built in logviewer dashboard of Umbraco.
Returns: Date
Displays a calendar UI for selecting dates which are saved as a DateTime value.
The only setting that is available for manipulating the Date property is to set a format. By default the format of the date in the Umbraco backoffice will be YYYY-MM-DD
, but you can change this to something else. See MomentJS.com for the supported formats.
See Common pitfalls for more information about why the dynamic approach is obsolete.
Alias: Umbraco.DateTime
Returns: DateTime
Displays a calendar UI for selecting dates which are saved as a DateTime value.
There are two settings available for manipulating the DateTime property.
One is to set a format. By default the format of the date in the Umbraco backoffice will be YYYY-MM-DD HH:mm:ss
, but you can change this to something else. See MomentJS.com for the supported formats.
The second setting is "Offset time". When enabling this setting the displayed time will be offset with the servers timezone. This can be useful in cases where an editor is in a different timezone than the hosted server.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
A Property editor is the editor that a Data Type references, and it's defined in a JSON manifest file and an associated JavaScript file.
A Property Editor is the editor that a Data Type references. A Data Type is defined by a user in the Umbraco backoffice and references a Property Editor. In Umbraco a Property Editor is defined in a JSON manifest file and associated JavaScript files.
When creating a Data Type, specify the property editor for the Data Type to use by selecting from the "Property editor" list (as shown below).
Umbraco comes pre-installed with many useful property editors.
Alias: Umbraco.Decimal
Returns: decimal
In the example above the possible values for the input field would be [8, 8.5, 9, 9.5, 10]
All other values will be removed in the content editor when saving or publishing.
If the value of Step Size is not set then all decimal values between 8 and 10 is possible to input in the content editor.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.ColorPicker.EyeDropper
Returns: string
The Eye Dropper Color picker allows you to choose a color from the full color spectrum using HEX and RGBA.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.ColorPicker
Returns: String (Hexadecimal)
Returns: Umbraco.Cms.Core.PropertyEditors.ValueConverters.ColorPickerValueConverter.PickedColor (When using labels)
The Color picker allows you to set some predetermined colors that the editor can choose between.
It's possible to add a label to use with the color.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
In this article you can learn how to use the build in email property editor
Alias: Umbraco.EmailAddress
Returns: String
Displays an email address.
The Email Address Property Editor does not come with any further configuration. The property can be configured once it has been added to a Document Type.
See the example below to learn how a value can be added or changed programmatically to an Email-address property. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
The value sent to an EmailAddress property needs to be a correct email address, For example: name@domain.com.
It is recommended that you set up validation on this property, in order to verify whether the value added is in the correct format.
In this article you can learn more about the various sections you can find within the Umbraco Backoffice.
A section in Umbraco is where you perform specific tasks related to a particular area of Umbraco. For example Content, Settings and Users are all sections. You can navigate between the different sections by clicking the corresponding icon in the section menu which is positioned at the top of the Backoffice.
The Section menu is the horizontal menu located at the top of the Umbraco Backoffice.
There are eight default sections that come with Umbraco:
The Content section contains the content of the website. Content is displayed as nodes in the content tree. Nodes can also show content state:
Grayed out nodes have not been published
In order to create content, you must define it using Document Types.
The Media section contains the media for the website. By default, you can create folders and upload media files (images and PDFs). You can customize the existing media types or define your own from the Settings section.
The Settings section is where you can work with the website layout files, languages, and define media and content types. In this section, you can also find the Log Viewer to browse through your log files.
The Settings tree consists of:
Document Types
Media Types
Member Types
Data Types
Macros
Relation Types
Log Viewer
Languages
Content Templates
Templates (.cshtml
files)
Partial views (.cshtml
files)
Partial View Macro Files (.cshtml
files)
Stylesheets (.css
files)
Scripts (.js
files)
The Settings section of the Umbraco backoffice has its own set of default dashboards. For more information, see the Settings Dashboards article.
In this section, you can browse and install packages into your Umbraco solution. You can also get an overview of all the installed packages as well as uninstall packages you no longer need.
Manage, create, and customize Backoffice users and user groups.
Manage, create, and customize members and member groups.
You can install Umbraco Forms directly from the Backoffice by clicking the install button. Once installed, this section is where you create and manage your forms.
This is the section where you create and manage your dictionary items.
In the top-right corner, you'll find a search tool, which is also accessible by hitting CTRL + Space
on your keyboard.
Next to the search tool, there is a help section. In the help section you can find Backoffice tours and links to Umbraco resources such as documentation and UmbracoTV.
There is also a small 'user section' with shortcuts to edit the currently logged in user, and view their most recent activities.
Along with the default sections that come with Umbraco, you can create your own Custom Sections.
A User can access a particular section based on the User Group permissions.
Learn more about how to configure the permissions in the article about backoffice users.
Alias: Umbraco.Label
Returns: String
Label is a non-editable control and can only be used to display a pre-set value.
If you want to set a value other than a String, you can define the data using one of the other available Data Types. These include Decimal, Date/time, Time, Integer, and Big integer.
There is also a Value Type: Long string if you need to set a long string value for your Label.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.Listview
Returns: IEnumerable<IPublishedContent>
List View display a list of categories when it is enabled on a Document Type that has children.
If enabled, editors will be able to see multiple children from a list on a content node that has children. When not enabled, no list will be shown and all children will be shown in the Content Tree.
Defines how many child content nodes you want to see per page. This will limit how many content items you will see in your list. If you set it to 5, then only 5 content items will be shown in the list.
Will sort your list by the selection you choose in the dropdown. By default it selects "Last edited" and you get the following three columns:
Last edited - When the content node was last edited and saved.
Name - Name of the content node(s).
Created by - This is the user who the content node was created by.
You can add more sorting to this list by adding more datatypes to the columns in the "Columns Displayed" section.
You can select order of the content nodes displayed, "Acsending" or "Descending". The order is affected by the "Order By" selection.
It is possible to add more columns to the list, via adding the properties through the dropdown. These properties are based on the Data Types which are used by the Document Type. It will show up in the dropdown by its alias and not the name on the property.
Once you have selected a column that you want to display, the next thing you want to do is define what its name should be and what kind of value it should display. You can also move the headers around, re-ordering how the headers should look. This is done by the move icon on the left side of the alias.
The template section is where you define what kind of value you want to display. The value of the column is in the value
variable.
The list view comes with two layouts by default. A list and a grid view. These views can be disabled if you are not interested in any of them.
A minimum of one layout needs to be enabled for the list view to work.
You can also make your own layout and add it to the settings. For example, if you wanted to change the width or length of the grid, you will be able to do so.
Select what kind of action is available on the list view.
Allow bulk publish - content only
Allow bulk unpublish - content only
Allow bulk copy - content only
Allow bulk move
Allow bulk delete
Changes the icon in the backoffice of the listview. By default it will look like the image below.
You can change the name of the listview itself. Default if empty: 'Child Items'.
Enable this to show the content app by default instead of the list view
The {{ value }}
will take the value of the Email property and display it in the list, as shown on the image below.
First, a Member Picker property needs to be present on the content item. In this example, the child item
has gotten a Member Picker Data Type with the alias of isAuthor
.
Now that the child item has a member and the value that should be displayed is the name of the picked value, the next step is to reconfigure the template value in the listview setting.
Returns: MediaWithCrops
Returns a path to an image, along with information about focal point and available crops.
When the Image Cropper is used on a Media Type the crops are shared between all usages of a Media Item. This is called global crops.
If the Image Cropper is used on a Document Type, the file and crops will be local to the Document.
Notice that it is possible make local crops on shared Media Items via the Media Picker Property Editor.
You can add, edit & delete crop presets the cropper UI can use.
The Image Cropper provides a UI to upload an image, set a focal point on the image, and use predefined crops.
By default, images in the Image Cropper will be shown based on a set focal point and only use specific crops if they are available.
The Image Cropper comes with 3 modes:
Uploading an image
Setting a focal point
Cropping the image to predefined crops
The editor exposes a drop area for files. Select it to upload an image.
By default, the Image Cropper allows the editor to set a focal point on the uploaded image.
All the preset crops are shown to give the editor a preview of what the image will look like on the frontend.
The editor can fit the crop to the image to ensure that the image is presented as intended.
ImageSharp.Web is image processing middleware for ASP.NET.
We bundle this package with Umbraco and you can therefore take full advantage of all its features for resizing and format changing. Learn more about the built in processing commands in the official ImageSharp documentation.
The Image Cropper comes with an API to generate crop URLs. You can also access the raw data directly as a dynamic object.
For rendering a cropped media item, the .GetCropUrl
is used:
The third parameter is HtmlEncode
and is by default set to true. This means you only need to define the parameter if you want to disable HTML encoding.
Or, alternatively using the MediaWithCrops
extension method:
Set the htmlEncode
to false so that the URL is not HTML encoded
To update a content property value you need the Content Service.
The following sample demonstrates how to add or change the value of an Image Cropper property programmatically. The sample creates an API controller with an action, which must be invoked via a POST request to the URL written above the action.
If you use Models Builder to generate source code (modes SourceCodeAuto
or SourceCodeManual
), you can use nameof([generated property name])
to access the desired property without using a magic string:
Crop URLs are not limited to usage within a view. IPublishedContent
has a GetCropUrl
extension method, which can be used to access crop URLs anywhere.
The following sample demonstrates how to use GetCropUrl
to retrieve URLs for all crops defined on a specific image:
Below the example to output a PNG using ImageSharp.Web format command.
Alias: Umbraco.MemberPicker
Returns: IPublishedContent
The member picker opens a panel to pick a specific member from the member section. The value saved is of type IPublishedContent.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
We highly recommend that you use the Media Picker instead.
This updated property contains more customizable features, and we recommend using this over the Media Picker, which is also marked as the old version of the picker.
Alias: Umbraco.MediaPicker
Returns: IEnumerable<IPublishedContent>
or IPublishedContent
This property editors returns a single item if the "Pick multiple items" Data Type setting is disabled or a collection if it is enabled.
Use Settings to overrule user permissions, to enable any user of this property to pick any Media Item of the choosen Start node.
When this setting is enabled, a user who doesn't normally have access to the media selected as "Start Node" (/Design in this case), can access the media when using this particular Media Picker. If no Start node has been defined for this property any content can be viewed and selected of this property.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.MemberGroupPicker
Returns: string
The Member Group Picker opens a panel to pick one or more member groups from the Member section. The value saved is of type string (comma separated IDs).
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
You can also add multiple groups by creating a comma separated string with the desired member group IDs.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.UploadField
Returns: string
Adds an upload field, which allows documents or images to be uploaded to Umbraco.
You can define which file types should be accepted through the upload field.
For uploading and adding files and images to your Umbraco project, we recommend using the Media Picker.
Find the full documentation for the property in the Media Picker article.
In code, the property is a string, which references the location of the file.
Example: "/media/o01axaqu/guidelines-on-remote-working.pdf"
The samples in this section have not been verified against the latest version of Umbraco.
Instead, we recommend using the Media Picker for uploading files to your Umbraco website.
See the example below to see how a value can be added or changed programmatically. To update a value of this property editor you need the Content Service and the Media Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.MarkdownEditor
Returns: System.Web.HtmlString
This built-in editor allow the user to use the markdown formatting options, from within a tinyMCE-like interface.
There are three settings available for manipulating the Markdown editor property.
Preview toggles if a preview of the markdown should be displayed beneath the editor in the content view.
Default value is inserted if no content has been saved to the Document Type using this property editor.
Overlay Size is used to select the width of the link picker overlay in the content view.
toggle bold text
Ctrl + B
toggle italic text
Ctrl + I
insert link
Ctrl + L
This opens the Select Link interface.
toggle quote
Ctrl + Q
toggle code block
Ctrl + K
insert image
Ctrl + G
This opens the Select Media interface.
toggle ordered list
Ctrl + O
toggle unordered list
Ctrl + U
toggle heading
Ctrl + H
This toggles between h1, h2 and off.
toggle a hr
undo
Ctrl + Z
redo
Ctrl + Y
select all
Ctrl + A
copy
Ctrl + C
paste
Ctrl + V
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
We highly recommend that you use the Block List instead.
Nested Content has been marked as obsolete and development on the property editor has been discontinued.
Alias: Umbraco.NestedContent
Returns: IEnumerable<IPublishedElement>
(or IPublishedElement
depending on configuration)
Nested Content is a list editing property editor, using Element Types to define the list item schema. By using Document Types you have the benefit of a reusable UI that you are familiar with and get to re-use all the standard Data Types as field editors. This property editor returns either a single item or a collection of this Document Type.
The Element Types that Nested Content uses are specialized Document Types - they can be found in the same section as Document Types. However, it is not possible to create content directly in the content tree with an Element Type - it is meant to be used in complex editors like Nested Content or Blocklist.
The Nested Content property editor is set-up/configured in the same way as any standard property editor, via the Data Types admin interface. To set-up your Nested Content property, create a new Data Type and select Nested Content from the list of available property editors.
You should then be presented with the Nested Content property editors Data Type editor as shown below.
The Data Type editor allows you to configure the following properties:
Doc Types - Defines a list of Document Types to use as data blueprints for this Nested Content instance. For each Document Type, you can provide the alias of the group you wish to render (the first group is used by default if not set) as well as a template for generating list item labels using the syntax {{propertyAlias}}
.
If you would like to include the Document Type name in the label, you can use {{alias}}
.
If you would like to include the index position in the label, you can use {{$index}}
.
If your property links to a content, media or member node, you can use the Angular filter {{ pickerAlias | ncNodeName }}
to show the node name rather than the node ID.
If your property is a rich text editor, you can use the Angular filter {{ pickerAlias | ncRichText }}
to show the unformatted text.
You can use conditional logic to show text instead of 1 or 0 for a true/false property: {{checkboxPickerAlias == 1 ? 'Yes' : 'No'}}
.
For more complex property types, you can display specific attributes by referencing the JSON attribute. For example, if using the MultiUrlPicker, show the name of the first link using {{urlPickerAlias[0]["name"]}}
.
Min Items - Sets the minimum number of items that should be allowed in the list. If greater than 0
, Nested Content will pre-populate your list with the minimum amount of allowed items and prevent deleting items below this level. Defaults to 0
.
Max Items - Sets the maximum number of items that should be allowed in the list. If greater than 0
, Nested Content will prevent new items being added to the list above this threshold. Defaults to 0
.
Confirm Deletes - Enabling this will demand item deletions to require a confirmation before being deleted. Defaults to true
.
Show Icons - Enabling this will display the item's Document Type icon next to the name in the Nested Content list.
Hide Label - Enabling this will hide the property editor's label and expand the Nested Content property editor to the full width of the editor window.
Once your Data Type has been configured, set-up a property on your page Document Type using your new Data Type and you are set to start editing.
There is a handful of editors that Nested Content does not support in its elements. These include:
When viewing a Nested Content editor for the first time, you'll be presented with an icon and help text to get you started.
Click the plus icon to start creating a new item in the list.
If your Nested Content editor is configured with multiple document-types you will be presented with a dialog window to select which Document Type you would like to use.
Click the icon of the Document Type you wish to use and a new item will be created in the list using that Document Type.
If you only have one Document Type configured for your Nested Content editor, then clicking the plus icon will not display the dialog and instead will jump straight to inserting an entry in the editor for you ready to edit.
More items can be added to the list by clicking the plus icon for each additional item.
To close the editor for an item or open the editor for another item in the list, you click the edit icon.
To reorder the list, click and drag the move icon up and down to place the items in the order you want.
To delete an item click the delete icon. If the minimum number of items is reached, then the delete icon will appear greyed out to prevent going below the minimum allowed number of items.
If Nested Content is configured with a minimum and maximum item of 1, then it goes into single item mode.
In single item mode, there is no icon displayed to add new items, and the single items editor will be open by default and its header bar removed.
In this mode, Nested Content works more like a fieldset than a list editor.
To render the stored value of your Nested Content property, a built in value converter is provided for you. Call the Value<T>
method with a generic type of IEnumerable<IPublishedElement>
and the stored value will be returned as a list of IPublishedElement
entities.
Example:
Each item is treated as a standard IPublishedElement
entity, which means you can use all the value converters you are used to using.
Example:
If your Nested Content property editor is configured in single item mode, then the value converter will automatically know this and return a single IPublishedElement
entity rather than an IEnumerable<IPublishedElement>
list. Therefore, when using Nested Content in single item mode, you can call Value<T>
with a generic type of IPublishedElement
and you can start accessing the entity's properties straight away, rather than having to then fetch it from a list first.
Example:
For the sake of this example, let us assume we have a Nested Content property with alias attendeeList
, where the element Document Type has an alias of attendee
. It has the Properties: user_name
, user_email
, join_time
, leave_time
, duration
, phone
.
To save data in Nested Content, we need to create a new C# List containing a Dictionary
of type <string, object>
. Dictionary<string, string>
would also work. The first dictionary item property/parameter we should specify for each Nested Content element is ncContentTypeAlias
, which is the alias of the Document Type that we have nested.
Afterwards, the entire list needs to be serialized to Json via JsonConvert.
In the above sample we iterate through a list of participants (the data for such participants could be coming from an API, for example), and add a new Dictionary
item for each person in the list.
Alias: Umbraco.MediaPicker3
Returns: IEnumerable<MediaWithCrops>
or MediaWithCrops
This property editors returns a single MediaWithCrops
item if the "Pick multiple items" Data Type setting is disabled or a collection if it is enabled.
Use setting to limit the picker to only select Media Items of these types.
Use this setting to enable the property to contain multiple items. When this is enabled the property editor returns an IEnumerable<MediaWithCrops>
.
You can still set the maximum amount to 1. Do so when you want to retrieve a collection but only allow the Content Editors to select one Media Item.
Use this setting to enforce a minimum and/or maximum amount of selected Media Items.
It is not possible to set a maximum amount when the "Pick multiple items" feature is disabled.
This setting is used to limit the Media Picker to certain parts of the Media Tree.
Use this setting to overrule user permissions, to enable any user of this property to pick any Media Item of the chosen Start node.
When this setting is enabled, a user who doesn't normally have access to the media selected as "Start Node" (/Design in this case), can access the media when using this particular Media Picker. If no Start node has been defined for this property any content can be viewed and selected of this property.
Enable the focal point setter, do only enable this if the focal point is used or if you have Image crops defined.
Define local image crops. Local image crop data is stored on the document in this property. This means it can differentiate between documents.
This is different from Global crops as they are defined on the Media Item, making the crops shared between all usage of that Media Item.
Global crops are configured on the Image Cropper property of the Image Media Type
Read about the Image Cropper here
Both local and global crops are retrieved using the method GetCropUrl
. If crops with identical aliases are defined both locally and globally, the locally defined crops are always prioritized by GetCropUrl
.
The following is an example of how to retrieve a crop from a MediaWithCrops
entry:
You can retrieve globally defined crops explicitly by using GetCropUrl
on the UrlHelper
:
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The following sample will update a single image in a Media Picker.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.MultiUrlPicker
Returns: IEnumerable<Link> or Link
Multi Url Picker allows an editor to pick and sort multiple urls. This property editor returns a single item if the "Maximum number of items" Data Type setting is set to 1 or a collection if it is 0. These can either be internal, external or media.
If Max number of items
is configured to 1
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.MultipleTextstring
Returns: array of strings
The Repeatable textstrings property editor enables a content editor to make a list of text items. For best use with an unordered-list.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
To add multiple values to the repeatable text strings property editor you have to put each value on a new line. This can be achieved using either \r\n\
or Environment.NewLine
.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.Integer
Returns: Integer
Numeric is an HTML input control for entering numbers. Since it's a standard HTML element the options and behaviour are all controlled by the browser and therefore is beyond the control of Umbraco.
This allows you to set up a minimum value. If you will always need a minimum value of 10 this is where you set it up and whenever you use the datatype the value will always start at 10. It's not possible to change the value to anything lower than 10. Only higher values will be accepted.
This allows you to control by how much value should be allowed to increase/decrease when clicking the up/down arrows. If you try to enter a value that does not match with the step setting then it will not be accepted.
This allows you to set up a maximum value. If you will always need a maximum value of 100 this is where you set it up. It's not possible to change the value to anything higher than 100. Only lower values will be accepted.
By casting the output as an int it's possible for you to do mathematical operations with the value.
You can also render the output by casting it to a string, which means you will not be able to do mathematical operations
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.Tags
Returns: IEnumerable<string>
The Tags property editor allows you to add multiple tags to a node.
The Tag group setting provides a way to categorize your tags in groups. So for each category you will create a new instance of the Tags property editor and setup the unique category name for each instance. Whenever a tag is added to an instance of the tags property editor it's added to the tag group, which means it will appear in the Typeahead list when you start to add another tag. Only tags that belong to the specified group will be listed. If you have a "Frontend" group and a "Backend" group the tags from the "Frontend" group will only be listed if you're adding a tag to the Tags property editor configured with the "Frontend" group name and vice versa.
Data can be saved in either Comma-Separated Values (CSV) format or in JSON format. By default data is saved in JSON format. The difference between using CSV and JSON is that with JSON you can save a tag, which includes comma separated values.
There are built-in property value converters, which means you don't need to worry about writing them yourself or parse the JSON output when choosing "JSON" in the storage type field. Therefore the last code example on this page will work out of the box without further ado.
Whenever a tag has been added it will be visible in the typeahead when you start typing on other pages.
You can use the ContentService to create and update Umbraco content from c# code, when setting tags there is an extension method (SetTagsValue) on IContentBase that helps you set the value for a Tags property. Remember to add the using statement for Umbraco.Core.Models
to take advantage of it.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled, you can get the alias of the desired property without using a magic string:
More on working with Tags (query all of them) can be found at the UmbracoHelper reference page
Alias: Umbraco.TextArea
Returns: String
Textarea is an HTML textarea control for multiple lines of text. It can be configured to have a fixed character limit, as well as define how big the space for writing can be. By default, there is no character limit unless it's specifically set to a specific value like 200 for instance. If you don't specify the number of rows, 10 will be the amount of rows the textarea will be occupying, unless changed to a custom value.
See the example below to learn how a value can be added or changed programmatically to a Textarea property. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Returns: Boolean
Toggle is a standard checkbox which saves either 0 or 1, depending on the checkbox being checked or not.
The Toggle property has a setting which allows you to set the default value of the checkbox, either checked (true) or unchecked (false).
It is also possible to define a label, that will be displayed next to the checkbox on the content.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.BlockList
Returns: IEnumerable<BlockListItem>
Block List is a list editing property editor, using Element Types to define the list item schema.
A default Umbraco CMS installation does not ship with a defined Data Type using the Block List editor. In order to start using the property, follow the steps outlined below.
Click here for an overview with a worked example and references back to the relevant documention.
The Block List property editor is configured in the same way as any standard property editor, via the Data Types admin interface.
To set up your Block List Editor property, create a new Data Type and select Block List from the list of available property editors.
Then you will see the configuration options for a Block List as shown below.
The Data Type editor allows you to configure the following properties:
Available Blocks - Here you will define the Block Types to be available for use in the property. Read more on how to set up Block Types below.
Amount - Sets the minimum and/or maximum number of blocks that should be allowed in the list.
Single block mode - When in Single block mode, the output will be BlockListItem<>
instead of BlockListModel
-
Live editing mode - Enabling this will make editing of a block happen directly to the document model, making changes appear as you type.
Inline editing mode - Enabling this will change editing experience to inline, meaning that editing the data of blocks happens at sight as accordions.
Property editor width - Overwrite the width of the property editor. This field takes any valid css value for "max-width".
Block Types are Element Types which need to be created before you can start configuring them as Block Types. This can be done either directly from the property editor setup process, or you can set them up beforehand and add them to the block list after.
Once you have added an element type as a Block Type on your Block List Data Type you will have the option to configure it further.
Each Block has a set of properties that are optional to configure. They are described below.
By configuring the properties in the group you can customize the user experience for your content editors when they work with the blocks in the Content section.
Label - Define a label for the appearance of the Block in the editor. The label can use AngularJS template string syntax to display values of properties. Examples and more details about labels and AngularJS templates.
Custom view - Overwrite the AngularJS view for the block presentation in the Content editor. Use this to make a more visual presentation of the block or even make your own editing experience by adding your own AngularJS controller to the view.
Custom stylesheet - Pick your own stylesheet to be used for this block in the Content editor. By adding a stylesheet the styling of this block will become scoped. Meaning that backoffice styles are no longer present for the view of this block.
Overlay editor size - Set the size for the Content editor overlay for editing this block.
It is possible to use two separate Element Types for your Block Types. Its required to have one for Content and optional to add one for Settings.
Content model - This presents the Element Type used as model for the content section of this Block. This cannot be changed, but you can open the Element Type to perform edits or view the properties available. Useful when writing your Label.
Settings model - Add a Settings section to your Block based on a given Element Type. When picked you can open the Element Type or choose to remove the settings section again.
These properties refers to how the Block is presented in the Block catalogue, when editors choose which Blocks to use for their content.
Background color - Define a background color to be displayed beneath the icon or thumbnail. Eg. #424242
.
Icon color - Change the color of the Element Type icon. Eg. #242424
.
Thumbnail - Pick an image or SVG file to replace the icon of this Block in the catalogue.
The thumbnails for the catalogue are presented in the format of 16:10, and we recommend a resolution of 400px width and 250px height.
These properties are relevant when you work with custom views.
Force hide content editor - If you made a custom view that enables you to edit the content part of a block and you are using default editing mode (not inline) you might want to hide the content-editor from the block editor overlay.
When viewing a Block List editor in the Content section for the first time, you will be presented with the option to Add content.
Clicking the Add content button brings up the Block Catalogue.
The Block Catalogue looks different depending on the amount of available Blocks and their catalogue appearance.
Click the Block Type you wish to create and a new Block will appear in the list.
Depending on whether your Block List Editor is setup to use default or inline editing mode you will see one of the following things happening:
In default mode you will enter the editing overlay of that Block:
In inline editing mode the new Blocks will expand to show its inline editor:
More Blocks can be added to the list by clicking the Add content button or using the inline Add content button that appears on hover between or above existing Blocks.
To reorder the Blocks, click and drag a Block up or down to place in the desired order.
To delete a Block click the trash-bin icon appearing on hover.
Rendering the stored value of your Block List property can be done in two ways.
You can choose to use the built-in rendering mechanism for rendering blocks via a Partial View for each block.
The default rendering method is named GetBlockListHtml()
and comes with a few options to go with it. The typical use could be:
"MyBlocks" above is the alias for the Block List editor.
If using ModelsBuilder the example can be simplified:
Example:
To make this work you will need to create a Partial View for each block, named by the alias of the Element Type that is being used as Content Model.
These partial views must be placed in this folder: Views/Partials/BlockList/Components/
. Example: Views/Partials/BlockList/Components/MyElementTypeAliasOfContent.cshtml
.
A Partial View will receive the model of Umbraco.Core.Models.Blocks.BlockListItem
. This gives you the option to access properties of the Content and Settings section of your Block.
In the following example of a Partial view for a Block Type, please note that the MyElementTypeAliasOfContent
and MyElementTypeAliasOfSettings
should correspond with the selected Element Type Alias for the given model in your case.
Example:
With ModelsBuilder:
A built-in value converter is available to use the data as you like. Call the Value<T>
method with a generic type of IEnumerable<BlockListItem>
and the stored value will be returned as a list of BlockListItem
entities.
Example:
Each item is a BlockListItem
entity that contains two main properties Content
and Settings
. Each of these is a IPublishedElement
which means you can use all the value converters you are used to using.
Example:
In some cases, you might want to use the Block List Editor to hold some data and not necessarily render a view since the data should be presented in different areas on a page. An example could be a product page with variants stored in a Block List Editor.
In this case, you can extract the variant's data using the following, which returns IEnumerable<IPublishedElement>
.
Example:
If using ModelsBuilder the example can be simplified:
Example:
If you know the Block List Editor only uses a single block, you can cast the collection to a specific type T
using .OfType<T>()
otherwise the return value will be IEnumerable<IPublishedElement>
.
Building Custom Views for Block representations in Backoffice is the same for all Block Editors. Read about building a Custom View for Blocks here
Alias: Umbraco.Slider
Returns: decimal
or Umbraco.Core.Models.Range<decimal>
Pretty much like the name indicates this Data type enables editors to choose a value with a range using a slider.
There are two flavors of the slider. One with a single value picker. One with a minimum and maximum value.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.Textbox
Returns: String
Textbox is an HTML input control for text. It can be configured to have a fixed character limit. The default maximum amount of characters is 512 unless it's specifically changed to a lower amount.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
Alias: Umbraco.UserPicker
Returns: IPublishedContent
The user picker opens a panel to pick a specific user from the Users section. The value saved is of type IPublishedContent.
Getting the Value of the property will return the user ID - properties of the User can be accessed by referencing UserService.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
When configuring a block, the label property allows you to define a label for the appearance of the Block in the editor. The label can use AngularJS template string syntax to display values of properties. Example: My Block {{myPropertyAlias}}
will be shown as: My Block FooBar
.
You can also use more advanced expressions using AngularJS filters. Example: {{myPropertyAlias | limitTo:100}}
or for a property using Richtext editor {{myPropertyAlias | ncRichText | truncate:true:100}}
.
It is also possible to use properties from the settings model by using {{$settings.propertyAlias}}
.
As well as the , Umbraco ships with some additional filters which are useful for setting the Label field of Block editors.
If the filters do not suit your needs, you can create custom filters by creating a plugin in App_Plugins
and adding a filter module. You can see an example below:
If you do not have an /App_Plugins
folder, you can create it at the root of your project.
Create a plugin by adding a folder inside App_Plugins
called MyFilters
Inside the MyFilters
folder add a package.manifest
file containing:
Add a myFilter.filter.js
file containing:
Returns: JSON
Gives editors a grid layout editor which allows them to insert different types of content in a predefined layout.
The basic concept of Grid Layouts.
How to setup your Grid Layout data type.
Add settings and styles.
Explanation of default Grid editors and how to customise them.
Build your own Grid editor from the ground up.
Render content created with Grid Layouts in your templates.
General guidelines when contemplating Grid Layout implementation.
Example how to add values programmatically.
To render a property based on the grid inside a template you should use the HtmlHelper extension:
This will render the grid item with alias "propertyAlias" from the current page models' content.
This will by default use the view /views/partials/grid/bootstrap3.cshtml
you can also use other provided grid template rendering files - for example the built-in bootstrap2.cshtml view by overloading this helper:
You can create your own custom grid rendering files e.g for your favourite or custom grid framework implementation. Tip: copy one of the existing files as a starting point. By convention, if you create your "mycustomrenderer.cshtml" file in /views/partials/grid
you can render the grid property like so:
or alternatively you can provide the path to where the file resides:
A grid layout can also expose custom settings - such as data-attributes or styling options - on each cell or row. This allows editors to use a friendly UI to add configuration values to grid elements. When custom settings and styles are applied, they will by default be included in the grid html as either html attributes or inline styles.
These settings and styles must be configured by developers when setting up the grid layout data type.
To add a setting, click the edit settings link. This will expand a dialog showing you the raw configuration data. This data is in the JSON format and will only save if it's valid JSON.
The settings data could look like this, with an object for each setting:
The different values are:
label
: Field name displayed in the content editor UI
description
: Descriptive text displayed in the content editor UI to guide the user
key
: The key the entered setting value will be stored under.
view
: The editor used to enter a setting value with.
prevalues
: For views that need predefined values, e.g. the radiobuttonlist view.
modifier (optional)
: A string formatter to modify the output of the editor to prepend or append extra values.
applyTo (optional)
: States whether the setting can be used on a cell or a row. If either not present or empty, the setting will be shown both on Rows and Cells.
label and description are straight-forward.
key defines the alias the configuration is stored under and by default the alias of the attribute will also be the attribute on the rendered html element. In the example above any value entered in this settings editor will be rendered in the grid html as:
By changing the key of the setting you can modify the <div>
element's attributes like class
, title
, id
or custom data-*
attributes.
view the view defines the editor used to enter a value. By default Umbraco comes with a collection of prevalue editors:
textstring
textarea
radiobuttonlist
mediapicker
imagepicker
boolean
treepicker
treesource
number
multivalues
Alternatively you can also pass in a path to a custom view like "/App_Plugins/grid/editors/view.html"
prevalues is for views that need predefined values, e.g. the radiobuttonlist view. Prevalues are defined as strings in an array:
and will translate in to three different options where each string will become a radiobutton. The strings represent the value of the options.
Prevalues can also be defined as an object of label/value allowing to have a displayed label instead of showing the actual underlying value. You can even mix and match these and use both label/value prevalues and string prevalues in the same configuration:
modifier is a basic way to prepend, append or wrap the value from the editor in a string. This is especially useful when working with custom styles which often requires additional values to function. For instance if you want to set a background image you can get an image path from the image picker view. But in order for it to work with css it has to be wrapped in url()
. In that case you set the modifier to url({0})
which means that {0}
is replaced with the editor value.
applyTo defines what this setting can be applied to. It should be either row or cell as a string.
A JSON object can also be used if you need a more specific configuration. A JSON configuration could look like this:
This would ensure the setting can only be used on rows named Article or Headline, or on cells sized: 4, 8 or 6. If it should only apply to cells you can remove the row property. If it should apply to all rows you can specify it by having the row property with null or an empty string as value.
There are many ways to combine these, here are some samples:
You can add multiple settings and styles configurations on a data type. This is done by creating a new setting or style object. Remember to separate the objects with a comma.
It is possible to use settings and styles to add full-width background-images, background-colors and so forth. Make sure the surrounding section is full-width (12 columns by default) and the rows inside it will automatically become full-width.
Alias: Umbraco.RadioButtonList
Returns: string
Pretty much like the name indicates this Data type enables editors to choose from list of radio buttons and returns the value of the selected item as string.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
A grid layout contains multiple configuration options to allow developers to tailor the grid to a very specific site design. Configuring the layout can be divided into 2 overall parts:
A layout is the general grid "container", it contains one or more sections which content editors can use to insert preconfigured rows. There are 2 main usage scenarios of layouts:
A single column layout which to the content editor will act like a full page canvas to insert elements on
A multiple column layout with a main content body, and one or more sidebar columns to insert lists or other sidebar widgets on.
You can however configure as many layouts and layout sections as you wish, each section in the layout must be given a width in columns, so editors gets an accurate preview of their layout.
A row in the grid editor contains one or more cells, which divide the row into areas where editors can enter content. So a row is merely a container of areas to insert content into. When you add a new row, you are asked to give it a name, then define cells inside the row by clicking the "+" icon. Each cell has a default width set to 4, but by clicking the inserted cell you can control its width.
It is possible to setup configurable attributes(class, rel, href) and inline styling on rows.
You can add as many cells as you like. If they overflow the total width of the row, they will be arranged after each other horizontally as you'd expect in a grid system.
Each cell can by default contain any type of editor such as textstring editors, imagespicker, embedded media or Umbraco macros. To override this behavior, uncheck the allow all editors option and you can specify which editors will be available for the row.
To understand how the grid layout editor works, we must first understand the structure of the grid layouts.
Grid layouts consists of two main areas that need to be configured, grid layout area and grid rows.
The layout area is where the overall page layout is defined. Layout areas are divided in to layout sections e.g. a sidebar section and content section. The size of the layout sections is defined in columns. For a full-width content area use max number of columns (12 for Bootstrap 3). Each layout section contains one or more rows.
Grid rows is where the actual content goes. Each row is divided into cells that contain the property editors. The size of the cells is defined in columns. Unlike the layouts sections it is possible to add more cells than the max number of columns - they will stack as they should in a grid system.
Alias: Umbraco.BlockGrid
Returns: BlockGridModel
The Block Grid property editor enables editors to layout their content in the Umbraco backoffice. The content is made of Blocks that can contain different types of data.
When testing out the property editor, you can use a set of predefined Blocks. The option will only be possible when there are no other Data Types using the Block Grid property editor.
Create a new Data Type.
Select the Block Grid as the Property editor.
Install the "Sample Configuration".
4 Blocks will be added to the property, ready for testing.
The Block Grid property editor is configured via the Data Types backoffice interface.
To set up the Block Grid property editor, follow these steps:
Navigate to the Settings section in the Umbraco backoffice.
Right-click the Data Types folder.
Select Create -> New Data Type.
Select Block Grid from the list of available property editors.
You will see the configuration options for a Block Grid property editor as shown below:
The Data Type editor allows you to configure the following properties:
Amount - Sets the minimum and/or the maximum number of Blocks that should be allowed at the root of the layout.
Live editing mode - Enabling this option will allow you to see the changes as you are editing them.
Editor width - Overwrites the width of the property editor. This field takes any valid CSS value for "max-width". For example: 100% or 800px.
Grid Columns - Define the number of columns in your grid layout. The default is 12 columns.
Layout Stylesheet - Replaces the built-in Layout Stylesheet. Additionally, you can retrieve the default layout stylesheet to use as a base for your own inspiration or for writing your own stylesheet.
Create Button Label - Overwrites the label on the Create button.
Once you have added an Element Type as a Block Type on your Block Grid Data Type you have the option to configure it.
Blocks can also be grouped. This is visible in the Block Catalogue and can also be used to allow a group of Blocks in an Area.
Each Block has a set of properties that are optional to configure. These are described below.
Customize the user experience for your content editors when they work with the Blocks in the Content section.
Label - Defines a label for the appearance of the Block in the editor. The label can use AngularJS template-string-syntax to display values of properties.
Label example: "My Block {{myPropertyAlias}}" will be shown as: "My Block FooBar".
You can also use more advanced expression using AngularJS filters, like {{myPropertyAlias | limitTo:100}}
or for a property using Richtext editor {{myPropertyAlias | ncRichText | truncate:true:100}}
. It is also possible to use properties from the Settings model by using {{$settings.propertyAlias}}
.
Content model - Presents the Element Type used as model for the Content section of this Block. This cannot be changed but you can open the Element Type to perform edits or view the properties available. Useful when writing your Label.
Settings model - Adds a Settings section to your Block based on a given Element Type. When selected you can open the Element Type or choose to remove the Settings section again.
Customize the Blocks size in the Grid. If you define multiple options, the Block becomes scalable.
By default, a Block takes up the available width.
A Block can be resized in two ways:
A Block can have one or more Column Span options defined.
A Column Span option is used to define the width of a Block. With multiple Column Span options defined, the Content Editor can scale the Block to fit specific needs.
Additionally, Blocks can be configured to span rows, this enables one Block to be placed next to a few rows containing other Blocks.
Available column spans - Defines one or more columns, the Block spans across. For example: in a 12 columns grid, 6 columns is equivalent to half width. By enabling 6 columns and 12 columns, the Block can be scaled to either half width or full width.
Available row spans - Defines the amount of rows the Block spans across.
These properties refer to how the Block is presented in the Block catalogue when editors choose which Blocks to use for their content.
Background color - Defines a background color to be displayed beneath the icon or thumbnail. Example: #424242
.
Icon color - Changes the color of the Element Type icon. Example: #242424
.
Thumbnail - Pick an image or Scalable Vector Graphics (SVG) file to replace the icon of the Block in the catalogue.
The thumbnails for the catalogue are presented in the format of 16:10. We recommend a resolution of 400px width and 250px height.
Allow in root - Determines whether the Block can be created at the root of your layout. Turn this off if you only want a Block to appear within Block Areas.
Allow in areas - Determines whether the Block can be created inside Areas of other Blocks. If this is turned off it can still be allowed in Block Areas by defining specific allowed Blocks.
Blocks can nest other Blocks to support specific compositions. These compositions can be used as a layout for other Blocks.
To achieve nesting, a Block must have one or more Areas defined. Each Area can contain one or more Blocks.
Each Area has a size, defined by column and rows spans. The grid for the Areas are based on the same amount of columns as your root grid, unless you choose to change it.
To scale an Area, click and drag the scale-button in the bottom-right corner of an Area.
Grid Columns for Areas - Overwrites the amount of columns used for the Area grid.
Areas - Determines whether the Block can be created inside Areas of other Blocks.
Alias - The alias is used to identify this Area. It is being printed by GetBlockGridHTML()
and used as name for the Area slot in Custom Views. The alias is also available for CSS Selectors to target the HTML-Element representing an Area.
Create Button Label - Overwrites the Create Button Label of the Area.
Number of blocks - Determines the total number of Blocks in an Area.
Allowed block types - When this is empty, all Blocks with Permissions for creation in Areas, will be available. This can be overwritten by specifying the allowed Blocks. Define the types of Blocks or Groups of Blocks that are allowed. Additionally, you can also set how many Blocks of each type/group should be present.
When allowing a Group of Blocks, you might want to require a specific amount for a certain Block of that Group. This can be done by adding that Block Type to the list as well and set the requirements.
These properties are relevant when working with custom views or complex projects.
Custom view - Overwrites the AngularJS view for the block presentation in the Content editor. Use this view to make a more visual presentation of the Block or make your own editing experience by adding your own AngularJS controller to the view.
Notice that any styling of a Block is scoped. This means that the default backoffice styles are not present for the view of this Block.
Custom stylesheet - Pick your own stylesheet to be used by the Block in the Content editor.
Overlay editor size - Sets the size for the Content editor overlay for editing this block.
Hide content editor - Hides the UI for editing the content in a Block Editor. This is only relevant if you made a custom view that provides the UI for editing of content.
When viewing a Block Grid property editor in the Content section for the first time, you will be presented with the option to Add content.
Clicking the Add content button opens up the Block Catalogue.
The Block Catalogue looks different depending on the amount of available Blocks and their catalogue appearance.
Click the Block Type you wish to create and a new Block will appear in the layout.
More Blocks can be added to the layout by clicking the Add content button. Alternatively, use the Add content button that appears on hover to add new Blocks between, besides, or above the existing Blocks.
To delete a Block, click the trash icon which appears on the mouse hover.
Blocks can be rearranged using the click and drag feature. Move them up or down to place them in the desired order.
Moving a Block from one Area to another is done in the same way. If a Block is not allowed in the given position, the area will display a red color and not allow the new position.
If a Block has multiple size options it can be scaled via the UI. This appears in the bottom left corner of the Block.
The Block is resized using a click-and-drag feature. Moving the mouse will change the size to the size options closest to the mouse pointer.
Rendering the stored value of your Block Grid property editor can be done in two ways:
You can choose to use the built-in rendering mechanism for rendering Blocks using a Partial View for each block.
The default rendering method is named GetBlockGridHtmlAsync()
and comes with a few options - for example:
In the sample above "myGrid"
is the alias of the Block Grid editor.
If you are using ModelsBuilder, the example will look like this:
To use the GetBlockGridHtmlAsync()
method, you will need to create a Partial View for each Block Type. The Partial View must be named using the alias of the Element Type that is being used as Content Model for the Block Type.
These Partial View files need to go into the Views/Partials/blockgrid/Components/
folder.
Example: Views/Partials/blockgrid/Components/MyElementTypeAliasOfContent.cshtml
.
The Partial Views will receive a model of type Umbraco.Core.Models.Blocks.BlockGridItem
. This model contains Content
and Settings
from your block, as well as the configured RowSpan
, ColumnSpan
, ForceLeft
, ForceRight
, and Areas
of the Block.
The Partial View for the Block is responsible for rendering its own Block Areas. This is done using another built-in rendering mechanism:
Here you will need to create a Partial View for each Block Type within the Block Area. For the name, use the alias of the Element Type that is being used as Content Model for the Block Type.
These Partial Views must be placed in the same folder as before, (Views/Partials/blockgrid/Components/
), and will receive a model of type Umbraco.Core.Models.Blocks.BlockGridItem
.
The following is an example of a Partial View for a Block Type of type MyElementTypeAliasOfContent
.
If you are using ModelsBuilder, you can make the property rendering strongly typed by letting your view accept a model of type BlockGridItem<T>
. For example:
Using the default rendering together with your layout stylesheet will provide what you need for rendering the layout.
If you like to use the Default Layout Stylesheet, you must copy the stylesheet to your frontend. You can download the default layout stylesheet from the link within the DataType, we recommend putting the file in the CSS folder, example: wwwroot/css/umbraco-blockgridlayout.css
.
A set of built-in Partial Views are responsible for rendering the Blocks and Areas in a grid layout. If you want to tweak or change the way the grid layout is rendered, you can use the built-in Partial Views as a template:
Clone the views from <a href="https://github.com/umbraco/Umbraco-CMS/">GitHub</a>
. They can be found in /src/Umbraco.Cms.StaticAssets/Views/Partials/blockgrid/
Copy the cloned views to the local folder Views/Partials/blockgrid/
Make changes to your copied views. The entry point for GetBlockGridHtmlAsync()
is the view default.cshtml
The built-in value converter for the Block Grid property editor lets you use the block data as you like. Call the Value<T>
method with a type of BlockGridModel
to have the stored value returned as a BlockGridModel
instance.
BlockGridModel
contains the Block Grid configuration (like the number of columns as GridColumns
) whilst also being an implementation of IEnumerable<BlockGridItem>
(see details for BlockGridItem
above).
The following example mimics the built-in rendering mechanism for rendering Blocks using Partial Views:
If you do not want to use Partial Views, you can access the block item data directly within your rendering:
The default layout stylesheet is using CSS Grid. This can be modified to fit your implementation and your project.
To make additions or overwrite parts of the default layout stylesheet, import the default stylesheet at the top of your own file.
You need to copy the Default Layout Stylesheet to your frontend. You can download the default layout stylesheet from the link within the DataType, we recommend putting the file in the CSS folder, example: wwwroot/css/umbraco-blockgridlayout.css
.
In this case, you would have to write the layout from scratch.
You are free to pick any style, meaning there is no requirement to use CSS Grid. It is, however, recommended to use CSS Grid to ensure complete compatibility with the Umbraco backoffice.
When extending or writing your own layout, you need to know the structure and what data is available.
For example: You can use the below HTML structure:
Building Custom Views for Block representations in Backoffice is based on the same API for all Block Editors.
In this example, we will be creating content programmatically for a "spot" Blocks in a Block Grid.
On a document type add a property called blockGrid.
Then add as editor Block Grid.
In the Block Grid add a new block and click to Create new Element Type
Name this element type spotElement with the following properties:
a property called title with the editor of Textstring
a property called text with the editor of Textstring
Then on the Settings model click to add a new Setting.
Then click to Create new Element Type.
Name this element type spotSettings with the following properties:
a property called featured with the editor of True/false.
The raw input data for the spots looks like this:
The resulting JSON object stored for the Block Grid will look like this:
For each item in the raw data, we need to create:
One contentData
entry with the title and text.
One settingsData
entry with the featured value (the checkbox expects "0"
or "1"
as data value).
One layout
entry with the desired column and row spans.
All contentData
and layoutData
entries need their own unique Udi
as well as the ID (key) of their corresponding Element Types. In this sample, we only have one Element Type for content (spotElementType
) and one for settings (spotSettingsType
). In a real life scenario, there could be any number of Element Type combinations.
First and foremost, we need models to transform the raw data into Block Grid compatible JSON. Create a class called Model.cs containing the following:
For the above code IContent? content = _contentService.GetById(1203);
change the id with your content node that is using the Block Grid.
In order to test this implementation, run the project and add /umbraco/api/blockgridtest/create
after your domain name. If the result shows as Saved then check your content node and you will see the 2 spotElement contents.
This can also be tested via Postman as well if preffered.
The samples in this section have not been verified against the latest version of Umbraco.
A new Property Editor called the Block based Grid editor will soon be available as a substitute for the existing Grid Layout editor. For more information, see the in the Umbraco Roadmap.
Create a file in /App_Plugins/yourpackage/editor.html
and add the following to the editor.html file:
Save the file and add an editor to the /App_Plugins/yourpackage/package.manifest
file:
Add a new file: /App_Plugins/yourpackage/editor.cshtml
- this file will handle rendering the entered data - this path is done by convention so:
view: 'editor' => views/partials/grid/editors/editor.cshtml
view: '/App_Plugins/path.html' => /App_Plugins/path.cshtml
If you wish to use something entirely different you can give the editor a separate render
value which follow the same conventions.
If you are building something slightly more complex then a text area, you will need to add a controller to the grid editor view. So first add a ng-controller attribute to the grid editor html - this works like building a property editor:
To wire up a controller to this view, create the file /App_Plugins/yourpackage/editor.controller.js
and add a standard angular controller declaration:
Finally, we need to tell Umbraco to load this JavaScript controller when the Umbraco application boots. This is like building a property editor. Add your JavaScript (and css dependencies) in the package.manifest
file in the /yourpackage
folder, and configure it to load your controller file.
So to summarize, to create a custom grid editor from scratch, you will need to:
Create a grid editor view .html
file
Create a grid render .cshtml
file
Create a grid editor controller .js
file
Create a package.manifest
to register the editor and make Umbraco load needed files
This process tries to be as close to building property editors as currently possible.
Next add this c# to the .cshtml file:
When rendering the .cshtml file will receive a dynamic model with the raw data of the editor:
So you can now use these value to build your razor output like so:
A grid editor is the component responsible for getting data into the grid - that could be a text field or a media picker. They're built in the same way as a property editor thus consists of 3 parts:
.html view file
.js controller
.cshtml server side renderer
The view is what the editor sees, the controller handles how it acts and the cshtml determines how the entered data is rendered in the template.
Grid editors are specified in /config/grid.editors.config.js
. By default this file doesn't exist, so before you attempt to extend the configuration, make sure to create it first.
The default items in the config file are as follows below. It is recommended that you copy all of editors below before you add more, in case some of them are already in use.
If you don't add the editors below to this config file then they won't be available in your grid editors, even if there are existing grid datatypes already using these editors.
You will need to restart your site before any new customizations become available to use.
Grid editor are created in the JSON format and each editor is an object like so:
You can customize the built-in editors to tailor the grid to your need.
It is recommended that you define custom editors in a package.manifest
file (not in the config file described above) like so:
While the root JSON element of /config/grid.editors.config.js
is an array of grid editors, package.manifest
files start with a JSON object with a number of different properties - one of them being gridEditors
.
The package manifest should be placed in a folder inside the /App_Plugins/
folder - for instance /App_Plugins/{YourPackageName}/package.manifest
. You can define as many grid editors you want and it can be done over multiple manifests so you can use grid editors from packages etc. With the package.manifest
file in place, Umbraco will automatically pick it up during startup.
Grid editor configuration
For a grid editor, the required values are:
name
: The name of the editor
alias
: Unique alias of the editor
icon
: Icon shown to the editor, uses same icon classes as the rest of
view
the view defines the editor used to enter a value. By default Umbraco will look in /umbraco/views/propertyeditors/grid/editors
for a html view to use - but you can pass in your own path
You can also add a name template for generating grid item labels using the syntax {{ value.propertyAlias }}
.
If you would like to include the index position in the label, you can use {{$index}}
.
If your editor links to a content, media or member node, you can use the Angular filter {{ value.udi | ncNodeName }}
to show the node name rather than the node ID.
If your editor is a rich text editor, you can use the Angular filter {{ value | ncRichText }}
to show the unformatted text.
The built-in views you can use are:
textstring
rte
embed
macro
media
In most cases you will either use the textstring or media view, or built your own from scratch. The textstring and media editors come with some additional configuration to make it quick to customise these.
Sample textstring config
In this sample, the config.style
value is applied to the editor so users can see an accurate preview in the backoffice. This will be applied as as inline styling to the textarea in the backoffice.
The config.markup
is the string rendered server side in your template. #value#
will be replaced with the actual value
Sample media config
In this sample config.size
will resize the image according to height
and width
. The above example will result in a rendered image that is 200x200 pixels no matter the size of the uploaded image. If the ratio of the size differs from the uploaded image it is possible to set a focal point that determines how the image should be cropped.
Sample macro config
In this sample a new option will appear in the Choose type of content
with direct access to the macro.
Alias: Umbraco.TinyMCE
Returns: HTML
The Rich Text Editor (RTE) is based on and is highly configurable. Depdending on the configuration, it will give your content editors more flexibility when working with content that should be more than only plain text.
Customize everything from toolbar options to editor size to where pasted images are saved.
Use CSS to define specific editor styles and add them to the RTE.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string:
It is possible to define specific styles and fonts for the Rich Text Editor (RTE). Once you've defined the styles, and enabled them on the RTE Data Type, the styles can be accessed directly in the content section.
The RTE styles are created and managed in the Umbraco backoffice.
Find the Stylesheets folder in the Settings section. Right-click the folder, select 'Create...' and choose New Rich Text Editor style sheet file. Give the new stylesheet a name and Save it - this will generate an empty CSS file.
At this point, you can start adding specific styles, that your editors can then use in the content section when creating and writing new content.
The image above is an example of how an RTE style can be configured. When working with these styles, the Preview feature will show you how the style will look when applied.
Every style you add, will automatically be added to the CSS file. The file will be placed in the same location as the rest of your CSS files. It's possible to edit the file directly from the backoffice as well. Access it from the Code tab in the top-right corner.
In order for your editors to be able to use the styles when working with content, two things needs to be done.
The styles will be accessed by the editors using the "Formats" dropdown in the toolbar of the RTE. In order the enable the dropdown, the "Style select" toolbar option needs to be checked.
You can have as many different styles for your RTEs as you want. You might want to have different styles for different RTE Data Types.
When configuring your RTE Data Types, you can select which stylesheets your content editors should be able to use.
You have full control over which options should be available on the RTE.
In the examble above, all 34 options have been enabled. The options include copy/paste buttons, font styles like bold and italics, bullet lists and options to embed videos and insert images.
It is possible to define specific styles that can be used when editing content using the RTE. You can use as many of these styles with the RTE as you want.
Define height
and width
of the editor displayed in the content section.
Define the maximum size for images added through the Rich Text Editor.
If inserted images are larger than the dimensions defined here, the images will be resized automatically.
The Rich Text Editor comes in two different modes: Classic and Distraction Free.
Classic
The default mode, which displays the toolbar in the top.
Distraction Free
In this mode the toolbar is hidden, and only shows up when content in the editor is highlighted.
Select the width of the link picker overlay. The overlay size comes in three sizes: Small, Medium, and Large.
When this option is checked the label and description for the RTE property will be hidden.
Some of the backoffice users might be restricted to a specific part of the content tree. When the "Ignore User Start Nodes" is checked, the users can pick any piece of content from the content tree, when adding internal links through the RTE.
Images added through the RTE is by default added to the root of the Media library.
Sometimes you might want to add the images to a specific folder. This folder can be configured using the "Image Upload Folder" setting.
The RTE can also accept advanced configuration through the appSettings.json
file fed into the TinyMCE configuration. This is within Umbraco:CMS:RichTextEditor
and allows you to configure the following:
CustomConfig
is slightly different from the rest as it extends the core config passed into TinyMCE.
Sometimes you want to allow your content editors to be able to add <script>
tags into the RTE. This tag is classed as invalid by default which means the configuration needs to be updated to allow it. This is not something that can be done through the CMS and requires advanced configuration in the appSettings.json
file. It uses the ValidElements
property to append ,script[*]
to the pre-existing list of valid elements as shown below.
This section explains how the concept of infinite editing in the Umbraco backoffice works.
This feature enables you to work with your content without losing the context of what you are doing.
Document Types are in different sections than content but infinite editing enables you to make changes to them directly from the content you are editing.
In the example showcased above, prevalues are being added to a Data Type, without losing the context of the content that's being worked on. The example also shows how you can edit images, without being sent to the 'Media' section.
Infinite editing is a feature that comes out of the box with Umbraco. The feature can be customized, which enables you as a developer to improve the workflow for your editors.
The following sink needs to be added to the array .
For more in depth information about logging and how to configure it, please read the .
Nodes have unpublished versions (but are currently published)
Nodes are protected from the public (can only be accessed by a logged in Member)
Nodes are currently locked/non-deletable
Nodes are containers (a List View for example)
This example uses a generic field on a child item and displays it in the list.
This will take the value picked up by the member picker.
And display it in the listview. Shown in the example below:
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the .
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the .
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the .
Implement a of your choice. When adding a label add {{ myFilter }}
which is the property alias of the element type. The myFilter
property has a textstring
editor. When adding the content, the block editor will then display the data that you input.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the .
Blocks - Defines the Block Types available for use in the property. For more information, see .
Block Types are based on . These can be created beforehand or while setting up your Block Types.
Get more tips on how to use AngularJS filters in Umbraco CMS from this community-made .
When a Block is placed in an Area, it will fit to the Areas width. Learn more about .
See the section of this article for an example of how scaling works.
By injecting and into an API controller, we can transform the raw data into Block Grid JSON. It can then be saved to the target content item. Create a class called BlockGridTestController.cs containing the following:
You can read more about package.manifest
files in general at the page.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the .
This can be done through the Content section using infinite editing, or by finding and editing the RTE Data Type in the Settings section of the backoffice. Learn more about the configuration options in the article.
The RTE styles are defined in CSS files which can be created in the Settings section. Read the article to learn more about this feature.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the .
$index
The 1-based index of this block item in the current block list
$settings
Provides access to the settings model for the block (if configured)
ncNodeName
Gets the name of a node
Umbraco node
ncRichText
Strips HTML
Richtext editor
AngularJS native truncate
String
n: maximum length of the string
Umbraco's richer truncate function
String
wordwise: boolean to indicaste whether to truncate a string mid-word or not
max: maximum length of the string
tail (optional): string to indicate a truncated string, "…
" by default
Truncates to a number of words (rather than characters)
String
n: maximum number of words in string
Converts a string to title case
String
Joins an array into one string
Array (of string or object)
separator: string used to join values together, e.g. ",
"
prop (optional): string key indicating which property to join when used on an array of objects
This section focuses on how to create data using the Umbraco backoffice
This section focuses on how to create data using the Umbraco backoffice.
There are three kinds of content in Umbraco:
Your normal website content that exists in the content section.
Media content such as images, videos and PDFs that are stored in the Media section.
Finally Members, used for user profiles and frontend authentication which you can find in the Members section.
A fundamental principle in Umbraco is that all content types have a definition (Document Types, Media Types, Member Types). These definitions are highly customizable, meaning you can add properties and have complete control over how the data is organized.
Defining Documents Types, adding properties and creating content.
Defining Media Types and uploading files to the media section, using upload fields and image cropper.
Defining Member Types and creating members for authentication and user profiles.
Creating and editing Data Types.
Schedule when content should be published / unpublished automatically.
Overview of how to add and reorder tabs, convert a group to a tab and manage the “Generic” tab
Control who has access to the Umbraco backoffice and what permissions they have.
An introduction to Relations and Relation Types, creating, and managing relationships between different entities in Umbraco.
Using Dictionary Items, you can store a value for each language. Dictionary Items have a unique key which is used to fetch the value of the Dictionary Item.
How to keep the noise down whilst ensuring your important content versions stick around indefinitely.
The grid layout editor offers non-technical editors a more visual editing environment to layout content pages and enter content of many different kinds.
The editor offers many configuration options, and as a website implementor, you could be tempted to use the grid for nearly every kind of content entry - this is however not encouraged.
To help developers determine when to use the grid layout, we've outlined the 2 major use-cases below.
The grid should primarily be used to replace content entry in a rich text editor (RTE). Where editors before would struggle with aligning images, lists and text or using tables inside the editor to layout content in columns.
The grid solves this scenario, giving editors predefined layouts and editors to enter content. They do not have to worry about how the content is rendered, since everything is stored in a very semantic format passing on that responsibility to the developer implementing the website.
Another common scenario the grid layout editor supports are managing and inserting widgets on a page. Using the grid, editors can pick pre-made components, either text, images, embedded elements or macros and insert them in a sidebar on the page.
This could replace various setups involving content pickers, repeatable content editors and other kinds of collections of content nodes and macros.
With the above usage scenarios in mind, consider the grids limitations. First of all, all content entered into the grid is stored as a single property value on the content node, as a big JSON object. This means that as soon as the values are stored in the database, there is no managed API to drill into the grid content and target specific cell content. A grid layout is not a recommended storage of reusable content - it wasn't designed for this scenario. If you wish to reuse content in multiple pages, it is still recommended that you store these pieces of content as separate content nodes, so they can be stored, cached and queried as usual.
Keep all customisation in the /App_Plugins/
folder. This makes it easier to share across multiple projects and ensures that nothing is lost in an update process.
The grid cannot solve every problem, neither was it meant to. It absolutely shines when configured correctly and designed to solve well-defined editor tasks, like entering content in a pre-defined layout and preconfigured options. If you put a standard grid editor on every page, expecting editors to do magic, you will be disappointed - and so will your editor.
So keep the use cases basic, spend time to configure and tune the grid in detail, this will truly make your editors love you.
A guide displaying the options available in the Settings section in Umbraco CMS backoffice.
The Settings section of the Umbraco backoffice has its own set of default dashboards. In this article, you can get an overview of each dashboard available in the Settings section:
Learn how to work with different types of Media content on your Umbraco website.
Media in Umbraco is handled the same way as content. Instead of defining Document Types you define Media Types that acts as a base for media items. The following default Media Types are available:
Article - Used for uploading and storing documents.
Audio - used for uploading and storing digital audio files.
File - used for uploading and storing different types of files in the Media section.
Folder - a container for organizing media items in the media tree.
Image - used for uploading and storing images.
Vector Graphics (SVG) - used for uploading and storing Scalable Vector Graphics files which are text files containing source code to draw the desired image.
Video - used for uploading and storing video files.
This means you don't have to define your own Media Types to start using the Media section. You have already got the tools for organizing and uploading the media.
If you have upgraded from an older version than 8.14 then the new media types are not added automatically. You can add those types manually yourselves by following the steps below 'Creating a new Media Type'. On the default media types page, you will find an overview of all new media types.
You can upload media in two different ways:
From the Media section in the Umbraco backoffice, you can add new media items by following either of the approaches defined below:
Use the Create dialog to to create a new Media item in the Media section
The Media item will be created based on the type you choose.
Upload the image or file, give the Media item a name, and click Save.
Use the Drag and drop feature to add your files to the Media section.
Umbraco will automatically detect the Media Type and create the Media item.
You can drop entire folders structures to recreate that same structure in the Media section.
New media items can be added to your site without interrupting the content creation-flow. This can be done following either of the two approaches outlined below.
Drag and drop the image(s) from your file explorer directly into the Media Picker property on the Content page.
Images added this way is automatically added to the user's start node in the Media section of the Umbraco backoffice.
Select the "+" icon to open the "Select media" dialog where you can add image(s) from your file explorer directly or using drag and drop.
It is always a good idea to start by creating a folder for your Media items. Make sure to name your folders in a way that makes it possible for editors to upload their media items in the right place.
To create a media folder, go to the Media section and click ... next to Media. Alternatively, you can right-click the Media node and choose Create. This will bring up the list of available media types. Select Folder, enter a name for the folder and click save.
The Image Media Type has 5 properties (Upload Image, Width, Height, Size and Type) that is populated once the image is uploaded. These properties can be viewed in the Media section and accessed in your templates.
Except the Folder Media Type, the rest of the media types has 3 properties - Upload Image, Type, and Size.
The default view for the media section is a card view that let's you preview the different media files.
Click the items to select multiple media items and perform bulk operations like moving or deleting them. To edit properties on a media item, click the name of the item, which you will see once you hover over the item.
You can switch to a list view by clicking the view toggle next to the search field and selecting the listview.
By adding a Media Picker property to a Document Type the editor will have the ability to select media items when creating content.
The Upload File property on the images use the Image Cropper Data Type. If crops are added to this you can adjust the individual crops on the media item and access them in templates. You can add crops by editing the Upload File property on the Image Media type in the Settings section.
You can create your own Media Types and add tabs, properties, and control the structure of the Media tree as you would with Document Types. This means you can store information that is specific to the media on the item itself.
A Media Type is created in the Settings section using the Media Type editor.
Go to the Settings section. On the Media Types node click ... next to Media Types (or right click the Media Types node) to bring up the context menu. Here you can choose between creating a New Media Type or a Folder.
Having different folders for different media types makes it possible to restrict where media items can be created. Only allowing PDF uploads in a certain folder or employee images in another makes it easier for editors to keep the Media section organized.
Choose New Media Type. This will open the Media Type editor. It is similar to the editor used for creating Document Types. The difference is that Media Types define items for the Media section and you do not have the ability to assign a template for the Media Type.
Name the Media Type Employee Image. Choose an icon by clicking the icon to the left of the name.
Before we start adding properties to the Media Type we need to add a tab/group to put these in. To add a tab/group, Click on Add tab or Add group and call it Image.
For more information on adding a tab, see Using tabs article.
We need to add the same properties as on the default Image Media Type. These are:
umbracoFile
umbracoWidth
umbracoHeight
umbracoBytes
umbracoExtension
On the Image group, click Add property. Name it Upload image and change the alias to umbracoFile.
Click Add editor, search for cropper and choose Image cropper under Create new. This will create a new Image Cropper Data Type. The name of the new Data Type type is a bit long so rename it to Employee Image Cropper.
Add two new crops called Thumbnail (200px x 350px) and wideThumbnail (350px x 200px).
Name the remaining four properties Width, Height, Size and Type and give them the aliases as mentioned in the image below. They should all use the Label editor. As mentioned before these properties will automatically be populated once an image has been uploaded.
Next up, we'll create a folder to hold the employee images. We could use the existing Folder Media Type but that would mean editors can upload employee images to any folder of that type. If we create a folder specifically for employee images there is only one place to put them thus making it easier to have an organized Media section.
Go back to the Settings and create a new Media Type and name it Employee Images. Select the folder icon by clicking the icon to the left of the name.
We want the same basic functionality (same properties and tabs) as the Folder Media type and that can be achieved by clicking Compositions and selecting the Folder Media Type. Now, Employee images will inherit tabs and properties from the Folder Media Type.
Switch to a list view by clicking the List view tab and toggle the Enable list view option.
We need to allow the Employee Image Media Type in our new folder. Go to the Permissions tab. Click Add child under Employee Images and select Employee Image.
Finally, define where the folder can be created. We want to create the folder in the root of the Media section so select the Allow at root option at the top of the Permission tab.
Go to the Media section and click the menu icon next to Media and select the Employee images folder. Name it "Employee Images" and click Save.
There are four options to add a new media items to the folder, as you can see here:
Remember you can uncheck the Allow at root option on the Employee images Media Type to prevent editors from creating multiple folders of this type. This will not affect created folders, only disable the creation of new ones.
If you select an image that has been uploaded to this folder you'll see the full image and the two crops we have defined below. Moving the pink focal point on the on the image will update the crops to focus accordingly. You can also edit the individual crops by selecting them and moving the image or adjust the slider to zoom.
Members are used for registering and authenticating external users of an Umbraco installation (ie. forum members, intranet users and so forth).
This guide will explain how to define and create members in the backoffice. If you want to work with members using the service APIs, links can be found at the end of the document.
There is a default Member Type that can be used to create members. You can customize this to fit your needs or create your own Member Type from scratch.
Go to the Members section, right-click Members in the member tree, click Create and choose Member.
Members have a number of mandatory properties that need to be filled in before a member can be saved. The properties are Login, Email, and the two Password fields in the Member tab.
There are also a number of default properties in the Member tab which are stored in the database in the tables Member
andTwoFactorLogin
:
umbracoMemberFailedPasswordAttempts
umbracoMemberApproved
umbracoMemberLockedOut
umbracoTwoFactorLogin
umbracoMemberLastLockoutDate
umbracoMemberLastLogin
umbracoMemberLastPasswordChangeDate
Once the Member is created and saved you can access it by expanding the Members tree and clicking All Members to get a list view. You can also view members of a specific type by selecting the member type in the Members tree.
Sensitive properties on a members data will not be displayed to backoffice users unless they have appropriate permissions. In order to see the values of the default properties in the Member tab you need to have the Sensitive data User Group. By having this group added to a user they will also have the option to mark member type properties as sensitive.
More information can be found under security.
You can create your own Member Types and add tabs, groups and properties as you would with Document Types.
Go to the Settings section, right-click Member Types and select Create. You will now be taken to the Member Type editor that is used to define and edit the Member Type. Name the new Member Type and click Save.
You will see that the Membership group is added automatically to any Member Types you create. This group includes umbracoMemberComments
property along with the other default properties which can be seen only in the Member tab when creating a member. The property is locked, which means you cannot remove it, but you can still configure the settings for the property:
It is possible to add more groups and more properties to each of the Member Types you create, as well as the default Member Type.
Member Groups define roles for your members that can be used for role-based protection. A member can be in multiple groups.
To create a new Member Group click the menu icon next to the Member Groups node in the Members section. Choose Create, name the group, and save the group.
To assign a member to a specific group find the member you wish to assign and find the Properties group. Here you can see which groups the member is already part of. You can also add the member to more groups or remove the member from already assigned groups:
As a developer you are able to leverage your website when you build on the Members section of Umbraco. The member's section is by default in the Umbraco backoffice, but you can still use it to implement some work on your front end. Members are created using ASP.NET Core Identity, so there are some provider settings that can be set in appsettings.json - here are the defaults:
You can find out more about the services methods in the reference section of the documentation by following the links below.
Video: Adding a member
Video: Member Type Properties
Video: Role-Based Protection
This guide will explain how to define, create, and manage users in the backoffice
Users (not to be confused with Members) are people who have access to the Umbraco backoffice. These could include Content Editors, Translators, Web Designers, and Developers.
This guide will explain how to define, create, and manage users in the backoffice.
Go to the Users section. Here, you will see an overview of all the current backoffice users.
To create a new user select the Invite user button. You will be prompted to add a Name and an Email for the new user. You will also need to select which User group the new user should be added to and enter a Message for the invitation.
Once you have created the user, an autogenerated password will be provided. This password needs to be used to access the account.
There are default properties on every user that can be defined:
Change/Remove photo.
Change Password (provides option to set a new password).
Disable (allows one to disable service access).
Update the email for the user.
Language (sets the backoffice language of the user account).
User Group (determines scope of access in the backoffice)
Start nodes for both Content and Media sections to limit the access
By default, the User Groups available to new users are Administrators, Writers, Editors, Translators and Sensitive Data.
Administrator: Can do anything when editing nodes in the content section (has all permissions).
Editor: Allowed to create and publish content items or nodes on the website without approval from others or restrictions (has permissions to Public Access, Rollback, Browse Node, Create Content Template, Delete, Create, Publish, Unpublish, Update, Copy, Move and Sort).
Writer: Allowed to browse nodes, create nodes, and request for publication of items. Not allowed to publish directly without someone elses approval like an Editor (has permissions to Browse Node, Create, Send to Publish and Update).
Translator: Are used for translating your website. Translators are allowed to browse and update nodes as well as grant dashboard access. Translations of site pages must be reviewed by others before publication (has permissions to Browse Node and Update).
Sensitive data: Any users added to this User group will have access to view any data marked as sensitive. Learn more about this feature in the Sensitive Data article.
You can also create your own custom User Groups and add properties and tabs as you would with Document Types and Member Types.
Go to the Users section and select the Groups tab in the top-right corner.
Select Create group and you will be taken to the User Group editor. Here you can define and edit the User Group through custom settings and properties.
Shows basic information about the User Group and settings for custom properties.
Name: The name of the User Group shown in the User Group tab.
Alias: Used to reference the User Group in code - the alias will be auto-generated based on the name.
Assign access: Define which sections and languages the users will have access to, and if the users should have access to only some or all content and media.
Default Permissions: Selects the default permissions granted to users of the User Group.
Granular permissions: Define a specific node the users in the group should have access to.
Users: Add users to the new group.
Depending on which User Group a user is added to, each user has a set of permissions associated with their accounts. These permissions either enable or disable a users ability to perform its associated function.
The available user permissions are defined under Default Permissions in the User group.
When a new user is created, you can set specific permissions for that user on different domains and subdomains. You can also set permissions on different User Groups, even for the default types.
As a developer you are only able to leverage your website from the backoffice when you build on the Users section of Umbraco. This is because the Users section is restricted to the Umbraco backoffice.
Umbraco Forms has a backoffice security model integrated with Umbraco Users. You can manage the details in the Users section of the backoffice, within a tree named Forms Security.
On this page you will find the media types and Data Types in Umbraco. These types are not created automatically after an upgrade. If you want to use the new types, you can create them yourself.
The UploadArticle
Data Type has the following configuration:
Property editor: FileUpload
Accepted file extensions: pdf
, docx
, doc
The UploadAudio
Data Type has the following configuration:
Property editor: FileUpload
Accepted file extensions: mp3
, weba
, oga
, opus
The UploadVectorGraphics
Data Type has the following configuration:
Property editor: FileUpload
Accepted file extensions: svg
The UploadVideo
Data Type has the following configuration:
Property editor: FileUpload
Accepted file extensions: mp4
, webm
, ogv
The UmbracoMediaArticle
media type has the following properties:
umbracoFile
- Upload File
umbracoExtension
- Label (string)
umbracoBytes
- Label (bigint)
The UmbracoMediaAudio
media type has the following properties:
umbracoFile
Upload Audio
umbracoExtension
Label (string)
umbracoBytes
Label (bigint)
The UmbracoMediaVectorGraphics
media type has the following properties:
umbracoFile
- Upload Vector Graphics
umbracoExtension
Label (string)
umbracoBytes
Label (bigint)
The UmbracoMediaVideo
media type has the following properties:
umbracoFile
- Upload Video
umbracoExtension
- Label (string)
umbracoBytes
- Label (bigint)
Language Variants allow you to vary content by culture, so you can allow a content node to exist in several languages.
Language Variants allows you to vary content by culture, so you can allow a content node to exist in multiple languages.
This article will cover the different aspects of enabling and working with language variants on your Umbraco website.
To work with Language Variants you need to have more than one language enabled. This can be done from the Settings
section:
You will always have one default language but each language can be set to mandatory.
Now that there are two languages to vary the content with, it needs to be enabled on the Document Types. To do so:
Go to the Document Type in the Settings section.
Open the Permissions page.
Toggle Allow vary by culture.
To allow a property on the Document Type to be varied it will have to be enabled for the property:
When you return to your content node you will notice two things:
At the top of the Content tree there will now be a dropdown so you can show the Content tree in the language of your choice.
To the right of the content name there is now a dropdown where you can select a language. You can also open a split view so you can see two languages at once.
Each Property Editor that does not allow variants (an Invariant Property) will by default need to be unlocked in order to be edited. The lock exists to make it clear that this change will affect more languages. Since the value of the invariant properties are shared between all variants on the website.
Whether or not the lock is enabled on the invariant properties depends on the AllowEditInvariantFromNonDefault
setting in the appsettings.json
file.
For projects created on Umbraco version 10.2 or later, the setting is true
, by default. If the project is upgraded to version 10.2 or later, the setting will by default be false
.
Learn more about the AllowEditInvariantFromNonDefault
setting in the Security Settings article.
To read about how you render variant content in Templates, check out the rendering content section.
Culture and hostnames must be added to your language sites before the content can be tested for variants:
Right-click the Home node and select Culture and hostnames....
Add a specific URL per language and save. For eg: An English language variant with English (United States) as the language can be given a specific URL https://yourwebsite.com/en-us and a Danish language variant can be given a specific URL https://yourwebsite.com/dk.
The Info content app should now show specific URLs for your language variants.
This feature is available from Umbraco version 10.2.
When you are working with a multilingual site you might want to control who can edit the different variations of the content on the website.
This can be controlled on a User Group level. All default User Groups, except the Sensitive data group, have access to all languages out of the box.
When "Allow access to all languages" is not checked, languages can be added and/or removed. This is to determine which variants the users in the user group have access to.
Even though the language permissions have been set, a user will still be able to view and browse all the language variations. The permission setting will ensure that only the added languages are editable by users of the User Group.
In this article you can learn about how to create and use Content Templates in Umbraco.
Content Templates allows a content editor to create a blueprint for new content nodes based on an existing node.
Before following this method you should have some content created beforehand.
Select a Content node from the Content menu:
Right-click the Content node and select the Create Content Template option. Alternatively, select the Actions dropdown of the content node and select the Create Content Template option:
Give your content template a Name:
Click the Create button and if the creation was successful, you will see a success notification:
The new content template will be created in Content Templates node of the Settings tree:
Refresh your browser, if you do not see the new content template in the Content Templates folder.
Click on the Settings menu:
Right-click on the Content Templates tree and select the Create menu item:
Select the Document Type you want to create a content template for:
Give your content template a Name and click the Save button:
The new content template will be created in Content Templates folder of the Settings tree:
To edit an existing content template, select a content template from the Content Templates folder of the Settings tree. When you have finished editing click the Save button:
Once you have created a content template, you can use the template to create new content nodes. To use a content template, right-click the Content tree and select Create:
When you click on a Document Type that has a content template you will see to options:
Create a new node based on a content template
Create a blank one
In this article you can learn the various ways of customizing the Umbraco backoffice login screen and form.
To access the backoffice, you will need to login. You can do this by adding /umbraco
at the end of your website URL, e.g. http://mywebsite.com/umbraco.
You will be presented with a login form similar to this:
The login screen contains a Greeting, Email, Password field and optionally a Forgotten password link
Below, you will find instructions on how to customise the login screen.
The login screen features a greeting which you can personalize by overriding the existing language translation keys. To do this, create a 'user' translation file for the default language of your Umbraco site, (usually en-US) to override the greetings. For en-US, you'd create a file called: en_us.user.xml
in the directory ~/config/lang/
. Then take the relevant keys (listed below) and add them to your ~/config/lang/en_us.user.xml
file, and update the greetings as necessary. Note: the config
directory needs to be in the root of your project (not the wwwroot
).
You can customize other text on the login screen as well. First, grab the default values and keys from ~/umbraco/config/lang/en.xml
. Thereafter copy the ones you want to translate into ~/config/lang/en_us.user.xml
file. Note: the new /config/ folder needs to be created at the site root.
The Forgotten password? link allows your backoffice users to reset their password. To use this feature, you will need to add the following key to the Umbraco.Cms.Security
section in the appsettings.json
file:
Set it to true
to enable the password reset feature, and false
to disable the feature.
You will also need to configure an Simple Mail Transfer Protocol (SMTP) server in your appsettings.json
file. When you get a successful result on the SMTP configuration when running a health check in the backoffice, you are good to go!
An example:
It is possible to customize the background image and the logo for the backoffice login screen by adding the "Content"
section in the appsettings.json
file:
The LoginBackgroundImage
and LoginLogoImage
are referenced from the /wwwroot/umbraco/
folder.
To affect the styling of the images add a folder to the /App_Plugins
folder containing a CSS
folder, containing a CSS file, and a package.manifest file. An example structure might be:
An example stylesheet might be:
An example package.manifest might be:
Here you'll find an explanation of how content is defined in Umbraco.
Before a piece of content can be created in the Umbraco backoffice, first it needs to be defined. That is why, when opening a blank installation of Umbraco, it is not possible to create content in the Content section.
All content needs a blueprint that holds information about what kind of data can be stored on the content node or which editors are used.
Additionally, it also needs information on how it is organized, where in the structure it is allowed, and so forth. This blueprint or definition is called a Document Type.
Document Types define what kind of content can be created in the Content section and what an end-user sees and can interact with.
It can define entire pages or more limited content that can be reused on other nodes ie. a Search Engine Optimization (SEO) group. This means that you are in complete control of what type of content can be created and where.
Another example is if there is a "Blog post
" Document Type that has some properties containing a thumbnail, a name, and an author image. Then all blog posts using the "Blog post
" Document Type, will allow the end user to fill in a thumbnail, author name, and an author image.
A Document Type contains fieldsets (or groups) where you can apply rules about where the content can be created, allowed template(s), backoffice icons, etc.
A Document Type is created using the Document Type editor in the Settings section.
Go to the Settings section in the backoffice.
On the Document Types node click the menu icon (•••) to bring up the context menu.
Here choose Document Type with Template. This will create a new Document Type with a template. The Template can be found under Templates in the Settings section which will be assigned as the default template for the Document Type.
You can also choose to create a Document Type without a template and create Folders to organize your Document Types. Other options are to create Compositions and Element types, which you can read more about in the Default Document Typessection.
First, we're prompted to give the Document Type a name. This first Document Type will be the root node for our content, name it "Home
".
The alias of the Document Type is automatically generated based on the property name. If you want to change the auto-generated alias, click the "lock" icon. The alias must be in camel case. For example: homePage
.
Having a root node lets you quickly query content as you know everything will be under the root node.
Choosing appropriate icons for your content nodes is a good way to give editors a better overview of the content tree.
To set an icon for the Document Type click the document icon in the top left corner. This will open the icon select dialog. Search for "Home"
and select the icon. This icon will be used in the content tree.
This will allow this Document Type to be created as the first content in the Content section.
Go to the Permissions tab
Tick the Allow as root toggle
Save the Document Type by clicking save in the bottom right corner.
Now that we have the Document Type in place, we can create the content.
Go to the Content section
Click on the menu icon next to Content
Select the "Home
" Document Type. We'll name it "Home
"
Then click the Save and Publish button.
As we haven't created our properties, all we can see on the "Home
" node is the Properties tab. This tab contains the default properties that are available on all content nodes in Umbraco.
Let's add some properties of our own.
In order to add the option to create different content on the same Document Type, some groups and properties need to be added.
Groups
Groups are a way to organize and structure the properties within the content, making it more manageable. It also makes it more user-friendly for content editors when creating or editing content on a website.
A name can be added to the group and after properties can be added.
Properties
Each field on a Document Type is called a property. The property is given a name, an alias (used to output the properties contained in a template), and an editor.
The editor determines what type of data the property will store and the input method. There is a wide range of default property editorsavailable and you can customize additional editors.
Some editors require configuration where a configured editor is saved as a Data Type and can be reused for multiple properties and document types. These can be seen in the Settings section under Data Types.
Go to the Settings section
Expand Document Types by clicking the arrow to the left
Select the "Home
" Document Type.
Keyboard Shortcuts
Keyboard shortcuts are available when you are working with the Document Type editor. To see which shortcuts are available, click ALT + SHIFT + K.
Before we start adding properties to the Document Type we need to create a group to hold the property.
Click Add group and name the group "Content
".
If you have multiple groups and/or properties you can order them with drag and drop or by entering a numeric sort order value. This is done by clicking Reorder.
To convert a group to a tab, see the Convert a group to a tab section in the Using Tabs article.
Now that we have created a group we can start adding properties. Let's add a Rich Text editor to the Content group.
Click the Add property link in the Content group. This opens the property settings dialog. Here you can set the metadata for each property (name, alias, description)
Choose which Data Type/property editor to use, and add validation if needed.
Give the property a name. The name will be shown to the editor to make it relevant and understandable. Notice the alias is automatically generated based on the name. We'll name this "Body Text
".
Clicking Select editor will open the Select editor dialog. Here, you can choose between all the available editors on the Create a new configuration tab. This will create a new configuration or already configured editors in the Available configurations tab.
To make it easier to find what you need use the search field to filter by typing "Rich
". Filtering will display configured properties first (under Available configurations) and all available editors under that.
Select the Rich Text editor under Create new. This will let you configure the editor settings - the Rich Text editor for this property.
The name of the Data Type is based on the name of the Document Type, the name of the property, and the property editor. Flor example: Home - Body Text - Rich Text editor.
Let's rename it to "Basic Rich Text editor
" and only select the most necessary options.
bold
italic
alignLeft
alignCenter
link
umbMediaPicker
When you are happy with the settings click Submit.
Selecting the Mandatory toggle makes the property mandatory and the content cannot be saved if no value is entered (in this case, the Richtext editor).
You have the option to add additional validation by selecting a predefined validation method under the Custom validation dropdown (such as email, number, or URL). Or by selecting a custom validation and adding a regular expression.
Save the Document Type.
If you go to the Content section and click on the Home node
you will now see the Content
group with the Body Text
property.
The description of the property is not necessary, but it´s a best practice as it guides the editor to use the property correctly. The property description supports some markdown and one custom collapse syntax:
Now if we put it all together we get something like this:
Next up we'll create a text page Document Type that will be used for subpages on the site.
Go back to the Settings section
Create a new Document Type
Name it "Text Page
".
Add a group called "Content
"
This time we'll add two properties:
First, make a property called "Summary
" using the Textarea editor
Secondly, create a property called "Body Text
" and reuse the Rich Text Editor Data Type.
Before creating a Text Page in Content section, allow the Text Page Document Type to be created as a child node to the Home node.
Select the "Home
" Document Type
Go to the Permissions group.
Click Add child
Select "Text Page
".
Go to the Content section
Click the menu icon (•••) next to the "Home
" node
Select the "Text page
" Document Type. We'll name the page "About us
".
We now have a basic content structure.
Document Types are flexible and can be used for defining pieces of reusable content or an entire page, to act as a container or repository.
You can also export document types from an already existing project/installation and import them into another project/installation.
Go to the Settings section
Right-click the Document type
Select Export. When you click on the Export button, the Document Type is saved as a *.udt file.
To import a Document Type:
Go to the Settings section
Right-click the Document type
Select Import Document Type
Click on the Import button and browse to the Document Type you exported. The Name and Alias of the Document Type are displayed.
Click Import to complete the process.
If your Document Type contains compositions or inherits from another Document Type, then you need to export/import the Composition/Document Type too.
You cannot export/import document types on Umbraco Cloud.
On this page, you will find the default Document Types in Umbraco. If you want to use these document types, you can create them in the Settings section.
Creating document types with templates allows you to define both the content structure and the visual presentation of a particular type of content item. It ensures a consistent and cohesive look and feel across your website while also enabling structured content management. This approach helps separate content from design, making it easier to manage and update your website's content and appearance independently through templates.
Creating a Document Type (without a template) is about defining the content structure and fields that can be used across different content items. You might use document types without templates for creating consistent, structured content that doesn't require a predefined page layout. For example blog posts or product listings.
Compositions provide a way to create reusable sets of properties that can be added to one or more document types. This can help simplify the management and consistency of content types across your website.
When using a mixed setup, you can take advantage of nesting and use compositions by clicking on "Compositions..." option.
If you create 2 compositions that contain some common properties it is only possible to pick one of the compositions in a Document Type.
An Element Type is a Document Type without a template containing schema configurations for repeating a set of properties. These are for defining schema in the Block List Editor, Block Grid Editor, or other Element Type based editors.
Element Types cannot be used to create content that resides in the Content tree. When you create an Element type, it automatically sets the Is Element Type flag to True on the Permissions tab.
Element Types are created using the same workflow as regular Document Types but usually contain fewer properties. You can also create Element Types as part of configuring a Block Grid or Block List Data Type.
A Data Type defines the type of input for a property. So when adding a property (on Document Types, Media Types and Members) and selecting the Type you are selecting a Data Type. There are preconfigured Data Types available in Umbraco and more can be added in the Settings section.
A Data Type can be something basic (textstring, number, true/false,...) or it can be more complex (multi node tree picker, image cropper, Grid Layout).
The Data Type references a Property Editor and if the Property Editor has settings these are configured on the Data Type. This means you can have multiple Data Types referencing the same Property Editor.
An example of this could be to have two dropdown Data Types both referencing the same dropdown Property Editor. One configured to show a list of cities, the other a list of countries.
To create a new Data Type, go to the Settings section within the backoffice. Thereafter click the menu icon to the right of the Data Types folder and select Create->New Data Type. Name the Data Type - we'll call it Dropdown Cities.
Property Editor: This is where you pick the Property Editor that our Dropdown Cities Data Type will be referencing. Pick the Dropdown and now you will see the configuration options that are available for a Data Type referencing the Dropdown Property Editor.
Enable multiple choice: By enabling this it will be possible to select multiple options from the dropdown.
Add prevalue: Here you can add prevalues to the Data Type by entering the value you want into the input field and pressing the add button or hitting Enter on your keyboard.
When you're happy with the list press Save. It is now possible to select this Data Type for a property on Document Types, Media Types, and Members. Doing this will then create a dropdown list for the editor to choose from and save the choice as a string.
To customize an existing Data Type go to the Settings section, expand the Data Types folder and select the Data Type you want to edit.
Besides the Data Types that are available out of the box there are some additional Property Editors. For example, think of the Slider and Block List.
To view the Data Type reference, go to the Settings section and expand the Data Types folder. Select the Data Type you wish to view the reference for and click the Info tab.
This gives you an overview of the Types that currently use the Data Type.
Learn more about viewing references or implementing tracking in the Tracking References article.
Umbraco sections are built around the concept of 'trees' and there is an implicit relationship between items in a section tree.
We refer to these relationships in the manner of a 'Family Tree' - eg, One content item might be the 'Parent' of some content items, and those content items would be referred to as the 'Children' of that parent. Items within the same branch of the tree can also be described as 'Ancestors' or 'Descendants' of an item, depending if they are above or below them in the depth of the tree.
There are methods in Umbraco to support querying content items by their relative position in the tree to the current page using these concepts, eg Model.Ancestors()
or Model.Children()
or Model.Descendants()
- but what about 'Cousins'?
What if there are no direct Parent/Child/Ancestor/Descendant relationships between two items in a tree, but they are still somehow 'related' in the context of your website? For example, the alternate language translation pages of a content page.
What if there is also a 'relation' between different types of Umbraco entities in your site, eg Content -> Member or Member -> MediaFolder? Perhaps, you'd like to be able to retrieve and display the uploaded images from a specific logged-in Member.
These are the scenarios where the concept of Umbraco Relations provides a solution.
Umbraco Relations allow you to relate almost any object in Umbraco to almost any other Umbraco object - under a defined Relation Type.
With a Content/Member/Media picker that you might add to a Content Type - the relationship is ONLY 1-way. Your content item knows it has 'picked' another content item, perhaps to display a shared banner across different pages, but that 'banner' content item doesn't know where it has been picked!
Umbraco Relations are 2-way, when you create a relation between two different types of entities, you can alway find one entity from the other and vice versa. eg you could list out in the backoffice all the pages that a content banner had been picked on.
To create and use Relations in your Umbraco Website, you need to define a 'Relation Type' to specify what the two types of entities will be relatable and to give the Relation Type an alias. So, you can test if two items are related for a particular 'relation type'. Two items might be related under multiple different Relation Types, and you might be only interested in your 'Related Language Page' Relation Type.
Navigate to the Settings section in the Umbraco backoffice and you'll find the Relation Types folder in the Settings tree.
If you expand the Relation Type tree, you can see that Umbraco 'ships' with some default Relation Types. These are used by the Umbraco backoffice to help deliver some key backoffice functionality:
For example, there is a Relation Type that tracks when Media is picked in Content to be able to provide the functionality of warning an editor if they try to delete a Media Item that it is 'in use'. There is a Relation Type, to help 'restore' deleted content back to the place it was deleted from in the Recycle Bin.
To create your new Relation Type, follow these steps:
Right-click the Relation Types folder.
Provide a Name for the Relation Type. This will generate it's alias.
Choose the Direction of the relationship, for example, usually Bidirectional to get the benefits of relations.
Define the type of one object in the relation called Parent that defines which column in the database this value is stored in.
For a bidirectional relationship, it doesn't matter which type of entity is defined as the Parent or the Child. If there is 'one thing' that will be related to lots of 'other things', then choose that thing as the Parent.
Choose the different types for each entity (Parent and child) from the drop-down list.
Currently the available types are: Document(Content), Media, Member, Document Type, Media Type, Member Type, Member Group, Data Type, Root, and Recycle Bin
Example: For relating Members to their uploaded Images, we might create a 'Member Images' relation
Select Is Dependency as Yes if you wish this Relation Type to be used in Umbraco's 'tracking' functionality; that warns editors when trying to delete entities if they are 'used' in a Relation Type marked as 'Is Dependency'
Click Create and you'll see your new Relation Type created in the Relation Types folder. You can see the 'Alias' that you'll need to make note of when working with Relations.
To view one of the existing Relation Types, go to the Relations tab. It displays a long list of all the objects that have been related for this specific Relation Type.
You can create Relations using the RelationService API via code.
Some examples are provided here in the RelationService Documentation Page
You might want to create a 'Relation' between two objects either as:
A response to a backoffice event. For example, a content item being published that has picked several other content items. Storing a relationship between these items would make querying between them easier. Perhaps show all the pages on which a particular 'banner' has been picked.
A logged-in member on the front end of an Umbraco website might have the facility to upload images. In response, the implementation could store the photos programmatically in the Media Section and at the same time, create a Relation to record the relationship between the member and their uploaded pictures. On an image gallery page, it would be possible to display all the gallery images for the current logged-in Member using the relations.
Some of the community packages that use Relations are listed below:
'Relations Picker' - a content picker that automatically creates Relations.
'ContentRelations' - allows you to relate two items via the Backoffice.
'LinkedPages' - Provides a LinkedPages context item to show, edit, and add relations between content pages.
In this section, an overview is given of how to add and reorder tabs, convert a group to a tab and manage the “Generic” tab.
Using tabs, you can organize properties in the backoffice to provide a tailored and efficient workflow for editors creating and maintaining Content, Media and Members.
Tabs allow you to add horizontal organization in your Document Types, Media Types and Member Types. This is handy for types that need a more defined hierarchy or have many properties and groups.
To add a tab, follow these steps:
Go to Settings.
Create or select a Document Type/Media Type/Member Type and click Add tab.
When adding the first tab, all existing groups are automatically added to the tab.
To reorder tabs, follow these steps:
Go to Settings.
Select a Document Type/Media Type/Member Type.
Select Reorder.
You can drag the tab where you want, manually add a numeric value next to the tab name or use the arrows to set a value.
This is important when using compositions, as you want to always display a tab/group at a certain position by setting a manual numeric value.
Select I am done reordering.
Click Save.
To convert a group to a tab, follow these steps:
Go to Settings.
Select a Document Type/Media Type/Member Type.
Select Reorder.
You can drag the group to the Convert to tab option.
Select I am done reordering.
Click Save.
Converting a tab back into a group is not possible, as tabs can contain groups, and nested groups are unsupported. To overcome this, create a new group and transfer all tab properties into it, then delete the empty tab.
Once you start adding tabs, you might see a “Generic” tab appear. This is done to hold groups and properties that are not assigned to a tab. For example, a group of properties coming from a composition that has no tab. In order to display the groups and properties correctly and have a solid data structure, they will be displayed under the “Generic” tab.
To manage the Generic tab on a Document Type/Media Type:
Go to the Composition Document Type/Media Type.
Click Add tab and enter the Name for the tab. All existing groups and properties are added to the tab.
Go to the Document Type/Media Type, the Generic tab will now be replaced by the tab from the composition.
Each document in Umbraco can be scheduled for publishing and unpublishing on a pre-defined date and time.
Each document in Umbraco can be scheduled for publishing and unpublishing on a pre-defined date and time.
You can find the options to do this click on the arrow next to the Save and publish button and pick Schedule...
This will open a Schedule Publishing dialog where you can specify dates and time.
Your server may be in a different timezone than where you are located. You are able to select a date and time in your local timezone and Umbraco will make sure that the item gets published at the selected time. So, if you select 12PM then the item will be published at 12PM in the timezone you are in. This may be 8PM on the server, which is indicated when you select the date and time.
If you are in the same timezone as the server, this message will not appear under the date picker.
In Umbraco versions lower than 7.5, the time you select has to be the time on the server, these older versions of Umbraco do not detect your local timezone.
All users with access to the Content section in the Umbraco backoffice are able to schedule content for publish/unpublish.
In some cases you will need to adjust your configuration to ensure that scheduled publishing/unpublishing works. The schedule works by the server sending an HTTP(S) request to itself.
If you are in a load balanced environment special care must be given to ensure you've configured this correctly, see the docs here
If you are not load balancing, the way that Umbraco determines the base URL to send the scheduled HTTP(S) request to is as follows:
umbracoSettings:settings/web.routing/@umbracoApplicationUrl if it exists (see these docs for details)
Else umbracoSettings:settings/scheduledTasks/@baseUrl if it exits (deprecated)
Else umbracoSettings:distributedCall/servers if we have the server in there (deprecated, see load balance docs)
Else it's based on the first request that the website receives and uses the base URL of this request (default)
If the umbracoApplicationUrl
is used, the value also specifies the scheme (either http or https). However if any of the other options are used and the appSetting umbracoUseSSL
is set to true
, then the request for scheduled publishing will always be sent to the HTTPS endpoint.
If your scheduled publishing/unpublishing is not working as you would expect it is most likely due to an issue that your server cannot communicate with the scheduled publishing endpoint. This can be caused by a number of reasons such as:
Url rewrites in place that prevent the endpoint from being reached
DNS misconfiguration not allowing the server to communicate to the base URL used in the first request that the website receives - which could be directly affected by a firewall/NAT/load balancer that your server sites behind
SSL and/or umbracoUseSSL misconfiguration not allowing the server to communicate to the scheduled publishing endpoint on the correct http/https scheme
To better diagnose the issue you can temporarily change your log4net config settings to be DEBUG instead of INFO. This will give you all sorts of information including being able to see whether or not the scheduled publishing endpoint is being reached or not.
In some cases it might be easiest to specify the umbracoSettings:settings/web.routing/@umbracoApplicationUrl setting to ensure that your server is communicating to itself on the correct base URL.
Learn about the default data types in Umbraco.
Here's a list of the default Data Types that come installed with Umbraco. There are plenty more that you can create based on the installed Property Editors.
Adds a list of approved colors. The approved colors are added as hex values by using the color picker. Optionally, you can enable labels to give the colors different names.
Displays a list of preset values as a list of checkbox controls. The preset values are modified in the Settings section under Data Types in Checkbox List where new items can be added. The value saved is a comma-separated string of prevalue IDs.
The Content Picker opens a modal to pick a specific page from the content structure. The value saved is the selected page's ID.
Displays a calendar UI for selecting date and time. The value saved is a standard DateTime value but does not contain time information.
Displays a calendar UI for selecting date and time. The value saved is a standard DateTime value.
Displays a list of preset values as a list where only a single value can be selected. The default Data Type does not contain any prevalues. The value saved is the selected value as a string.
Displays a list of preset values as a list where multiple values can be selected. The default Data Type does not contain any prevlaues. The value saved is a comma separated string of prevalue IDs.
Allows to upload and crop images by using a focal point. Specific crop definitions can also be added. This Data Type is used by default on the Image Media Type.
The Image Media Picker opens a modal to pick images from the Media tree or images from your Computer. The value saved is the selected media node UDI.
Is a non-editable control and can be used to only display the value. It can also be used in the Media section to load in values related to the node, such as width, height and file size.
There are six Label Data Types:
Label (bigint) - Allows to save a big integer value for a Label.
Label (datetime) - Allows to set a DateTime value for a Label.
Label (decimal) - Allows to set a decimal value for a Label.
Label (integer) - Allows to set an integer value for a Label.
Label (string) - Allows to set a long string value for a Label.
Label (time) - Allows to set time for a Label
This Data Type is used by Document Types that are set to display as list views.
This Data Type is used by Media Types that are set to display as list views.
This Data Type is used by Member Types that are set to display as list views.
The picker opens a modal to pick a specific media item from the Media tree. The value saved is the selected media node UDI.
Displays a dropdown with all the available members. A single member can be selected. The value saved is the ID of the member.
This Data Type allows an editor to add an array of links. These can either be internal Umbraco pages external URLs or links to media in the Media section. The Data Type can be configured by limited number of links it is possible to add.
The picker opens a modal to pick multiple images from the Media tree. The value saved is a comma separated string of media node UDIs.
The picker opens a modal to pick multiple media items from the Media tree. The value saved is a comma separated string of media node UDIs.
A textbox to input a numeric value.
This Data type enables editors to choose from a list of radiobuttons.
The TinyMCE based WYSIWYG editor. This is the standard editor used to edit larger amount of text. The editor has a lot of settings, which can be changed on the Richtext editor Data Type in the Settings section.
In the default settings some tags such as bullet list can be used. If you want to use other tags like h1
or h2
, you need to add stylesheets.
Create Rich Text Editor stylesheets for each tag(h1
or h2
) and select them when configuring the Rich Text Editor Data Type. Learn more about how to configure this Data Type in the Rich Text Editor articles.
The "Style select" options need to be enabled in the toolbar section.
An example of the stylesheet tree is as follows:
A textbox that allows you to use multiple tags on a Document Type. You can specify a Tag Group for the Data Type, if you need to use Tags on different sections of your site.
A textarea provides a multi-line plain-text editing control. You can set the maximum allowed characters for the textarea and the number of rows, if any.
A normal HTML input text field.
A checkbox which saves either 0 or 1, depending on the checkbox being checked or not. A common use is to create a property with the 'umbracoNaviHide' alias and the Data Type True/False. This will provide editors with the option to hide nodes in the navigation menu on the website.
Adds an upload field, which allows documents or images to be uploaded to Umbraco. This does not add them to the media library, they are added to the document data.
There are five Upload Data Types:
Upload Article - Used for uploading and storing documents.
Upload Audio - Used for uploading and storing digital audio files.
Upload File - Used for uploading and storing different types of files in the Media section
Upload Vector Graphics - Used for uploading and storing Scalable Vector Graphics (svg) files which are text files containing source code to draw the desired image.
Upload Video - Used for uploading and storing video files.
The Block Editors are property editors that enables you to build advanced editor tools using a set of predefined Document Types.
Umbraco 10 initially shipped with one Block Editor which is Block List. Block Grid editor has been introduced from version 10.4.0.
Alias: Umbraco.DropDown.Flexible
Returns: String
or IEnumerable<string>
Displays a list of preset values. Either a single value or multiple values (formatted as a collection of strings) can be returned.
If enabled, editors will be able to select multiple values from the dropdown otherwise only a single value can be selected.
Prevalues are the options which are shown in the dropdown list. You can add, edit, or remove values here.
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Modelsbuilder is enabled you can get the alias of the desired property without using a magic string: