Feature - Page Title and Description

Automatically display the Title and Description of the current page

What It Does#

Displays the current page's title and description as a prominent header

The Page Title and Description feature reads the pageTitle and pageDescription properties from the current page and renders them as a centred hero-style header. The title appears as a large display heading and the description as a lead paragraph beneath it.

This feature is typically the first block on every page, placed inside a full-width layout12 at the top. It provides a consistent page header across the entire site without editors needing to re-enter the title and description in the content area.

The title and description are entered on the Page Properties tab, not in the block editor.

How It Works#

Reads page-level properties rather than block content

Unlike most features which render their own content properties, the Page Title and Description feature reaches up to the current page using Umbraco.AssignedContentItem and reads the pageTitle and pageDescription values directly.

The view casts the current page to IContentHeadingDefault — a ModelsBuilder interface that provides strongly-typed access to the page title and description properties. If the page doesn't implement this interface, the feature renders nothing.

The feature uses _Layout_Features.cshtml as its layout, giving it the standard feature wrapper. However, the feature's own title is typically left empty since the page heading itself serves as the visual header.

The pageTitleShort property provides a shorter version used in navigation menus, keeping hero headings expressive while menu items stay concise.

On this page

featurePageTitleDescription.cshtml#

@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem>

@{
    Layout = "_Layout_Features.cshtml";
    // Get the current page
    if(Umbraco.AssignedContentItem is not IContentHeadingDefault currentPage) return;
}

<div class="container p-3 mt-3 d-flex justify-content-center">
    <div class="w-75 text-center">
        <h1 class="display-1">@currentPage.PageTitle</h1>
        <p class="lead">@currentPage.PageDescription</p>
    </div>
</div>