USING DOCUMENT TYPE PROPERTIES

Umbraco has a number of properties that are standard to all installations. You can reference these properties much like you do with your own custom properties in XSLT and .NET macros as well as in any templates. You can find examples of how to use these properties, along with your own custom ones, in Chapters 4 and 5.

Built-in Properties

The following properties are available for any given node in the Umbraco XML cache and .NET Node object. Table 3-6 provides a detailed description of each property. For examples on how to use the .NET Node object, see Chapter 12.

TABLE 3-6: Built-in Properties

PROPERTY NAME DESCRIPTION
id The unique sequential autogenerated node ID.
parentId The ID of the parent node.
level The level at which this node is currently on. Note here that the first level is the root, which is eff ectively 0. So, in the Runway installation, as used in Chapter 1, the Runway Homepage is at level 1.
nodeType The ID of the document type that the current node is created from.
template The ID of the template that the node is currently using.
sortOrder The order of the node within the current parent. sortOrder restarts with each parent level.
urlName The name of the page in URL-friendly format. For example, the Runway Homepage has a urlName of runway-homepage. The urlName does not have the full path or an extension on it. This is all compiled based on the path property and is done at runtime.
nodeName The name of the node ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.