Templates are the vehicle in which Umbraco delivers content from pre-defined document types (see Chapter 3) to the end user. The templates render not only the content that you save in Umbraco, but also the design elements and markup that you provide for the browser to display. The three major concerns when it comes to templates are

  • Effective separation: One of the most common goals among developers is to develop applications that are easy to maintain and deploy. An important consideration in achieving this goal is the separation of business logic from presentation (the design and output). You accomplish this goal in Umbraco by leveraging .NET master pages and the features they present. This includes nesting and inheritance, covered later in this chapter.
  • Flexible presentation: You should design any web application or website with maximum flexibility in mind. Users demand changes constantly, so the more flexible your layouts are, the easier you can overhaul or make your designs “fresh” while keeping disruptions of the underlying infrastructure to a minimum.
  • Reusability: Finally, as a developer you are constantly striving to be more efficient in how you work. Creating templates that are reusable for multiple scenarios is key.

With these points in mind, let's start looking at how this all applies to Umbraco.

How Templates Build Layout and Structure

When defining the structure of your website, it is important to keep in mind how that structure ...

Get Umbraco User's Guide now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.