You can format every documenttype you want by using the alias in the config.

Currently only the nodetype 'content' is supported. In the future we may add media, stylesheet and other types.
Therefore we use a node named 'content' as a sort of section to make sure the correct nodetype is formatted.
As you can see met 'media'-section is already in the config file, but still unsupported.


<default /> is the default for all nodes.

Formatting your node is pretty easy. Default it supports placeholders {yourfieldname}, but Razor is also supported.

Placeholder Example

<![CDATA[{nodename} ({writername}) (S) <sup>({id})</sup> (NIET RAZOR)]]>
Supported placeholders: any field and node properies like:
{id}, {createdate}, {creatorid}, {creatorname}, {level}, {nodename}, {name}, {niceurl}, {url}, {urlname},
{nodetypealias}, {updatedate}, {version}, {writerid}, {writername}, {parent}, {path}, {sortorder}, {template}

Razor Example

Pretty useless but it check whether a id is odd or even and prefixes the number with whatever it is.
<mydocumenttype type="razor">
@inherits umbraco.MacroEngines.DynamicNodeContext
<span>@Model.Name @Model.NodeTypeAlias</span><sup>(
@if ((Model.Id % 2) == 0)
@("even ") @Model.Id
@("odd ") @Model.Id

Need-to-know: Unpublished items

Unfortunately unpublished items will not work with Razor as they are not available as @Model.
Therefore it will fallback on the non-Razor version.

Future ideas

  • Caching for the treeformat to enhance performance
  • Support custom classes on the node
  • Support custom icons (could be useful in the media section).

Last edited Nov 30, 2012 at 7:48 AM by mjvannieuwkerk, version 9


No comments yet.