O'Reilly logo

Umbraco User's Guide by Paul Sterling, Nik Wahlberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

USING SPECIAL UMBRACO TAGS

Like most CMSs, Umbraco utilizes special tags to render any content that is entered by a user in the backoffice. If you're at all familiar with .NET syntax for including user controls or custom tags, this should make you feel right at home. Here's what a basic tag looks like:

<umbraco:Item field=“pageName” runat=“server”></umbraco:Item>

This is the tag in its simplest form. It can get more complex than this—in fact, a lot more complex. The Umbraco backoffice UI has a widget to insert these Umbraco items in your templates, so you don't have to do the heavy lifting. This includes built-in fields, like the one field reference in the previous code snippet, as well as custom document type properties. You can launch the Insert Umbraco page field dialog (shown in Figure 4-9) by clicking the insert Umbraco page field button located toward the top of the right-hand pane next to the Save button.

FIGURE 4-9

image

The Insert Umbraco page field dialog contains the fields presented in Table 4-1.

TABLE 4-1: Umbraco Page Fields

FIELD DESCRIPTION
Choose field Allows you to pick from any of the built-in properties provided by Umbraco or any of the custom properties that you defined in your document types.
Alternative field Offers the same list of properties as available in the Choose Field, only the Alternative Field option is used if the Choose Field value is null ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required